Hi,
I have to create multiple grids dynamically with dynamic columns.(Grid genereated at code behind C#). I have created columns in onInit event of radgrid.I have two buttons outside the grid which is used to display and hide columns when clicked on that. In this scenario when i click any of the button it should hide some columns and show other columns for eg (if i click the second button it should hide first 5 columns and show next 5 columns. Initially the first 5 columns only shown on load other 5 are hidden).
The whole grid was created and all the maniplations are done in an ASCX file. This Control file is referred and created multiple times as per the requirement.
This control works fine if it has created for only one time. But i get some problems when it created more than once.
The problem is when i click on the button the grid needdatasource function should not be called, since i am using private function to hide and show columns and no grid rebind method or any thing related to ribind is written. But the problem when i have two or more grids the grid needdatasource method is fired and then creates the loads some unrelavent data. Eg (Binds some other grid data to some other grid and viseversa)
Please help me in this regards.
Kannan
I have to create multiple grids dynamically with dynamic columns.(Grid genereated at code behind C#). I have created columns in onInit event of radgrid.I have two buttons outside the grid which is used to display and hide columns when clicked on that. In this scenario when i click any of the button it should hide some columns and show other columns for eg (if i click the second button it should hide first 5 columns and show next 5 columns. Initially the first 5 columns only shown on load other 5 are hidden).
The whole grid was created and all the maniplations are done in an ASCX file. This Control file is referred and created multiple times as per the requirement.
This control works fine if it has created for only one time. But i get some problems when it created more than once.
The problem is when i click on the button the grid needdatasource function should not be called, since i am using private function to hide and show columns and no grid rebind method or any thing related to ribind is written. But the problem when i have two or more grids the grid needdatasource method is fired and then creates the loads some unrelavent data. Eg (Binds some other grid data to some other grid and viseversa)
Please help me in this regards.
Kannan