PDA

View Full Version : how to set the value of an entire column in a grid



pancho.munyoz
24 Jan 2013, 11:22 AM
I have a GridPanel and I need set the value for entire Column using a variable that I have defined

friend
24 Jan 2013, 12:50 PM
Try something like this:



var someValue = 5;
var records = yourGrid.getStore().getRange();
Ext.Array.forEach(records, function(item, index, allItems) {
item.set('desiredFieldName', someValue);
});

pancho.munyoz
24 Jan 2013, 1:37 PM
Thanks.... you are the best :)