Changing Grid Panel Data Store

  1. #1

    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?

  2. #2

    RE: Changing Grid Panel Data Store




    Hi

    Sorry for the rush! is there any solution to this problem? or can you suggest any alternatives?

    thanks in advance.
    Anand
  3. #3
    Quote Originally Posted by anand View Post
    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?
    I am facing the same problem but looks like still there is not a way out for this.
  4. #4
  5. #5
    Thanks Danil. I figured out the things without changing stores, but still its helpful.
    I really appreciate your help

Similar Threads

  1. [CLOSED] Changing Grid Store configuration in MVC application
    By Daly_AF in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 18, 2012, 1:41 PM
  2. Replies: 1
    Last Post: Mar 08, 2012, 2:52 PM
  3. Replies: 0
    Last Post: Dec 22, 2010, 7:33 AM
  4. Replies: 11
    Last Post: Mar 03, 2010, 5:46 AM
  5. Replies: 6
    Last Post: Feb 11, 2009, 3:13 PM

Posting Permissions