himan
29 Apr 2010, 8:07 PM
I m having a GridPanel with many columns
In the grid i m hiding and showing columns several time, using setHidden(),
for(var j = 0;j<gridColsIdArr.length-1; j++)
{
colModelForView.setHidden(colModelForView.getIndexById(gridColsIdArr[j]), true); //hiding all columns of grid
}
for(var k = 0;k<showColArrId.length; k++)
{
colModelForView.setHidden(colModelForView.getIndexById(showColArrId[k]), false); // showing user view columns only
// colModelForView.setColumnWidth(colModelForView.getIndexById(showColArrId[k]),80,false);
//alert('a');
}
Here gridColsIdArr is array of column Id which i have to hide, and showColArrId is array of column to show.
colModelForView is columnModel of my grid.
Everything is working fine when number of records in grid are less, but as the number of records increases it starts working very slow(means hiding and showing of columns are working slow), is there any other way to hide show columns or how can i solve this.
plzz some one reply...
In the grid i m hiding and showing columns several time, using setHidden(),
for(var j = 0;j<gridColsIdArr.length-1; j++)
{
colModelForView.setHidden(colModelForView.getIndexById(gridColsIdArr[j]), true); //hiding all columns of grid
}
for(var k = 0;k<showColArrId.length; k++)
{
colModelForView.setHidden(colModelForView.getIndexById(showColArrId[k]), false); // showing user view columns only
// colModelForView.setColumnWidth(colModelForView.getIndexById(showColArrId[k]),80,false);
//alert('a');
}
Here gridColsIdArr is array of column Id which i have to hide, and showColArrId is array of column to show.
colModelForView is columnModel of my grid.
Everything is working fine when number of records in grid are less, but as the number of records increases it starts working very slow(means hiding and showing of columns are working slow), is there any other way to hide show columns or how can i solve this.
plzz some one reply...