I am trying to use RadMenu in conjunction with RadTabStrip.
My requirement in as follows:
Have a RadMenu with two menuitems (Item1,Item2), clicking on the menu item should create a new RadTab and a new RadPageView. Each of these RadPageView's is loaded with a user control (.ascx) based on the menu item clicked.
To Acheive this, I am handling the ItemClick event of RadMenu. This event handler does the following
- Create a new RadTab object.
- Add this object to RadTabStrip on the page
- Create a new RadPageView object
- Load the corresponding user control and the same to the new page view
- Setting PageViewID of the tab to the corresponding PageView.ID
- Add this object to RadMultiPage on the page.
All of this seems to be working fine. When the menu item (Item1) is clicked, RadTab is getting created and its corresponding RadPageView is also getting created properly.
When the second menu item (item2) is clicked, I find that the previous added RadPageView (of Item1) exisits but the user controls added in this page view are no more present !
How can i fix this issue so that clicking of menu items does not cause the controls to vanish?