I have a web form that I would like to show multiple RadGrids each with a different data source. Only one grid should be displayed at a time depending on a user action. I've been able to get this to work using Ajax but with multiple PlaceHolders. I just make the unneeded PlaceHolders visible=false. I would like to use a single PlaceHolder.
I'm building my grid structure and setting up ajax programmatically. So, in the Page_Init I build the grid structure for all my grids. I need to do this because in Page_Load I'm adding all the ajax settings to the controls, otherwise all the controls will be null.
When the user action occurs I clear the PlaceHolder, build the specific grid, and add the new grid to the PlaceHolder. The problem is the previous grid is still there and the two grids appear, not just the recent one. It seems like the RadGrid is not clearing from the PlaceHolder when I do this.PlaceHolder1.Controls.Clear().
Any ideas?
Thanks
Jonathan
I'm building my grid structure and setting up ajax programmatically. So, in the Page_Init I build the grid structure for all my grids. I need to do this because in Page_Load I'm adding all the ajax settings to the controls, otherwise all the controls will be null.
When the user action occurs I clear the PlaceHolder, build the specific grid, and add the new grid to the PlaceHolder. The problem is the previous grid is still there and the two grids appear, not just the recent one. It seems like the RadGrid is not clearing from the PlaceHolder when I do this.PlaceHolder1.Controls.Clear().
Any ideas?
Thanks
Jonathan