Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- internalSetAllColumn: function(column, newValue) {
- column.masterValue = newValue;
- column.header = '<div class="x-grid3-check-col-td loading-indicator"> </div>'; // loading icon
- this.grid.getView().updateHeaders();
- (function() {
- this.grid.getStore().each(function(rec) {
- if (this.isCellEditable(rec)) {
- rec.set(this.dataIndex, newValue);
- }
- }, this);
- column.renderHeaderCheck();
- this.grid.getView().updateHeaders();
- }).defer(50, this);
- }
- this.grid.getStore().each(function(rec) {
- rec.set.defer(1, rec, [this.dataIndex, newValue]);
- }, this);
- column.renderHeaderCheck();
- this.grid.getView().updateHeaders();
- internalSetAllColumn: function(column, newValue) {
- var store = this.grid.getStore(),
- gridView = this.grid.getView();
- column.masterValue = newValue;
- store.suspendEvents();
- store.each(function(rec) {
- rec.set(this.dataIndex, newValue);
- }, this);
- store.resumeEvents();
- column.renderHeaderCheck();
- gridView.refresh();
- }
- var task = {
- run: function(){
- Ext.fly('clock').update(new Date().format('g:i:s A'));
- },
- interval: 1000 //1 second
- }
- Ext.TaskMgr.start(task);
- internalSetAllColumn: function(column, newValue) {
- column.masterValue = newValue;
- column.header = '<div class="x-grid3-check-col-td loading-indicator"> </div>'; // loading icon
- this.grid.getView().updateHeaders();
- var store = this.grid.getStore();
- var count = store.getCount();
- var step = 5;
- var times = (count / step) >> 0;
- var task = {
- run: function() {
- var last = step * task.taskRunCount;
- var first = last - step;
- if (first <= count) {
- var recs = store.getRange(first, last);
- Ext.each(recs, function(rec) {
- rec.set(this.dataIndex, newValue);
- }, this);
- }
- if (task.taskRunCount > times) {
- column.renderHeaderCheck();
- this.grid.getView().updateHeaders();
- return false;
- }
- },
- interval: 1,
- scope: this
- };
- Ext.TaskMgr.start(task);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement