Saturday, 15 June 2013

extjs - How to hide grid columns effectively -



extjs - How to hide grid columns effectively -

i have big grid many columns. when user clicks on button, calls function analyzes whole store - cell cell, if finds no changes in particular column, hides it, othewise column stays visible. quite big number of columns hidden, can see, operation - column hiding rendering - "heavy", browser may alert, code runs long. hiding this:

var cols=grid.headerct.getgridcolumns(); ext.each(cols, function (item, index, all){ if(condition) item.setvisible(false); });

i tried utilize ext.suspendlayouts() , ext.resumelayouts(), leads bug. though operation runs faster, instead of column hiding columns' titles hidden. so, need more optimal , working solution.

suspendlayouts() , subsequent resumelayouts() 1 of ways go. need phone call grid.getview().refresh() after resume layouts.

another alternative phone call reconfigure, however, removes "hidden" columns columns menu.

extjs extjs4

No comments:

Post a Comment