Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
615
Updating Column Properties with AsyncPostBack and EnableViewState
posted

Hi,

I would like to know if there is a way on the server side to update column properties on an AsyncPostBack.  I want to be able to change which columns are visible and also the column header text.  I make the changes on the server side, but right now they aren't reflected on the client side, though data updates do occur.

Parents
No Data
Reply
  • 29417
    Offline posted

    Hello rbailey003 ,

     

    Thank you for posting in our forum.

     

    You’ll need to call the RequestFullAsyncRender method of the current ContainerGrid after you’ve data binded the grid. For example if you need to make the changes in the RowUpdating event you can do the following:

     

    protected void WebHierarchicalDataGrid1_RowUpdating(object sender, Infragistics.Web.UI.GridControls.RowUpdatingEventArgs e)

      {

          this.WebHierarchicalDataGrid1.Columns[0].Hidden = true;

     

          ContainerGrid grid = (ContainerGrid)sender;

          WebHierarchicalDataGrid1.DataBind();

         grid.RequestFullAsyncRender();

       

      }

    Usually internal async post backs are initiated to update only part of the grid. Calling this method during an async post back will enforce the grid to update its HTML and reinitialize itself entirely as if the page was just loaded.

    Please refer to the attached sample and let me know if you have any further questions or concerns.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer

    Infragistics, Inc.

    http://es.infragistics.com/support

     

    UpdateCol.zip
Children