Remove Columns from a grid
is there a way to completly remove columns from a grid? I have the problem if i set columns hidden, that they are shown up again if i add columns and reconfigure the grid. When i reconfigure i tell ext to not hide them because every new column must show up. I do not want another array where i save the already hidden columns. And another thing is that the grid gets really slow if i add some more columns.
Thanks...
var newFields = new Array();
for (var i = 0; i < fields.length; ++i) {
if (fields[i].name != 'm1_'+ gId) {
newFields.push({name: fields[i].name});
}
}
fields = newFields;
never tought that it was so simple :)
var newFields = ; //new array shortcut
Ext.each(fields, function(field, index, allFields) {
if (field.name != 'm1_'+ gId) {
newFields.push({name: field.name});
}
});
fields = newFields;
(or did you also wanted to remove the field from the store?)
#If you have any other info about this subject , Please add it free.# |