May 08, 2009, 9:02 AM
Changing Grid Panel Data Store
Hi,
I'm trying to change the data store of a grid panel during an ajax postback. There is no error either in compile or in run time, but grid is not showing any records. I'm adding grid columns in the same ajax method and columns are displaying properly. My code looks like below:
//gpSRActionDetail.StoreID = stSRActionDetail.ID;
ClearColumns(gpSRActionDetail);
Coolite.Ext.Web.Column jobPackCode = new Coolite.Ext.Web.Column();
jobPackCode.Header = "Job Pack Code";
jobPackCode.DataIndex = "JobPackCode";
jobPackCode.Width = 50;
gpSRActionDetail.AddColumn(jobPackCode);
Coolite.Ext.Web.Column jobPackDate = new Coolite.Ext.Web.Column();
jobPackDate.Header = "Job Pack Date";
jobPackDate.DataIndex = "JobPackDate";
jobPackDate.Width = 50;
....
gpSRActionDetail.DataBind();
Also i;ve tried to create store fields during the same ajax metod and no use (i've tried using adding fields like Store1.Reader.Reader.AddField(), i've seen Store1.AddField and Store1.RemoveFields mehods in another post but i'm getting compilation error i'm on 0.7 version)Cant we change store if a gird panel in ajax post back?