I am adding columns from codebehind. there are some hidden columns and some columns are visible. When we display a hidden column and then do sorting etc , the particular column hides back again as we are rebinding the datagrid on page load. Is there any where to persist the display of columns ?
I am not quite sure from where you have added the columns. When generating a grid in the Page_Init event handler, grid
columns should be added to the Controls collection of the
MasterTableView after their attributes are set. Check out the following help article for more on this. Programmatic creation.
Please elaborate your scenario if it doesn't help.
If your grid is declared in mark-up you should create its columns on initial Page_Load, instead of on Page_Init. Also, as said in the other forum thread that you have opened, rebinding is not needed in Page_Load, since RadGrid will fire its NeedDataSource event automatically in this case.
In case after making these changes, some of the issues persist, please write in the other forum thread, so that we avoid double posting.