Hello,
I have a page that has 2 grids and an asp:panel that contains various controls including a button. When the page first loads only the 2 grids are visible. When the user clicks a button command in grid1, I want to display the panel and hide grid2 such that only grid1 and the panel are visible. When the user clicks a "cancel" button in the panel, I want to hide the panel and redisplay grid2 such that only the 2 grids are visible. I want similar behavior when the user clicks a button command in grid2 i.e. I want to display the panel and hide grid1. When they click the "cancel" button in the panel, I want the panel to be hidden and grid2 redisplayed.
I am using RadGrids and a RadAjaxManager. The grids have been added through the designer, but the columns are programmatically created.
When I click the button command in grid1, the panel will display, but grid2 will not hide, yet if I click something in grid2 with the panel visible, grid2 will disappear and never come back. Same thing happens if I start with the grid2 button command. The panel will display, but grid1 won't disappear, yet if I click something in grid1 it will disappear and never come back.
The button command in grid1 makes a call to a function that does this:
Thanks!
Lyn
I have a page that has 2 grids and an asp:panel that contains various controls including a button. When the page first loads only the 2 grids are visible. When the user clicks a button command in grid1, I want to display the panel and hide grid2 such that only grid1 and the panel are visible. When the user clicks a "cancel" button in the panel, I want to hide the panel and redisplay grid2 such that only the 2 grids are visible. I want similar behavior when the user clicks a button command in grid2 i.e. I want to display the panel and hide grid1. When they click the "cancel" button in the panel, I want the panel to be hidden and grid2 redisplayed.
I am using RadGrids and a RadAjaxManager. The grids have been added through the designer, but the columns are programmatically created.
When I click the button command in grid1, the panel will display, but grid2 will not hide, yet if I click something in grid2 with the panel visible, grid2 will disappear and never come back. Same thing happens if I start with the grid2 button command. The panel will display, but grid1 won't disappear, yet if I click something in grid1 it will disappear and never come back.
The button command in grid1 makes a call to a function that does this:
aspPanel.Visible =
true;
grid2.Visible =
false;
The button command in grid2 makes a call to function that does this:
aspPanel.Visible = true;
grid1.Visible =
false;
The button command in the asp:panel makes a call to a function that does this:
// hide the panel
aspPanel.Visible =
false;
// show all the grids
grid1.Visible = true;
grid2.Visible =
true;
I'm thinking it has something to do with how I configure the AjaxManager so here is how I have it set up right now:
ajaxManager.AjaxSettings.AddAjaxSetting(grid1, grid1);
ajaxManager.AjaxSettings.AddAjaxSetting(grid2, grid2);
ajaxManager.AjaxSettings.AddAjaxSetting(grid1, aspPanel);
ajaxManager.AjaxSettings.AddAjaxSetting(grid2, aspPanel);
Thanks!
Lyn