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.
yes, that was the problem. Thank you for your help!
Hi Ross,
If you are updating your columns, be sure you are changing the properties from the GridView columns collection. Properties changed on the Band (the WHDG in this case) columns collection are not copied to the row island after it is created.
regards,David Young
Maya,
Thank you for your advice and your prompt reply. Here is some code that runs when a drop-down box outside of the grid is selected. The InitVisibleColumns function has all the logic that determines which columns are visible. The variable dgPayWorksheet is the WebHierarchicalDataGrid object. The variable udpClientTransferees is the UpdatePanel that contains dgPayWorksheet. This code isn't having the intended effect. Can you advise me further?
Thank you,
Ross
InitVisibleColumns();
dgPayWorksheet.DataBind();
udpClientTransferees.Update();
dgPayWorksheet.GridView.RequestFullAsyncRender();
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://ko.infragistics.com/support