PDA

View Full Version : Column doesnt show data after show()



slckysr
27 Dec 2010, 11:58 PM
hi i have a grid which uses a store.

10 columns are in that grid but only 9 are shown. if i click to a toggle button, the 10th column will be shown and the same store will be reloaded with a different url: this partis in these code below



{
id: 'showdailybutton',
iconCls: 'dailyreport',
enableToggle: true,
handler: function(item){
if(grid_zones.getColumnModel().isHidden(4))
{
grid_zones.getColumnModel().setHidden(4, false);
store_zones.proxy.conn.url = '/agencies2/inc/stores.php?store=zones&showdaily=t';
store_zones.load();
}
else
{
grid_zones.getColumnModel().setHidden(4, true);
store_zones.proxy.conn.url = '/agencies2/inc/stores.php?store=zones';
store_zones.load();
}
},
scope: this

}



ok now for the next part. how i said before the column is shown and the store is reloaded with the new parameters, i can check this in httpwatch.

but the column doesnt show the data. do i have to reload the grid again or something like this ?

excuse me for my english its not so well.

Condor
28 Dec 2010, 12:55 AM
No, this should be enough.

Are you sure the 4th column is mapped correctly on a field in the store?

slckysr
28 Dec 2010, 1:15 AM
thnx for the response Condor,

yes i mentioned it as the 10th but actually its the fourth column. after a next try it worked i dont know why itsnt worked before but now everything is fine :D

but i have a new question how can i change the grouping field at runtime, in these case if i show the column, i want to group the columns by the datecolumn ?

slckysr
28 Dec 2010, 1:30 AM
ok i found this too: i used store.groupBy('fieldname');