I have an application that opens to a screen with a radtabstrip. The tabstrip has 3 tabs. The first is loaded when the page is loaded. The second and third tabs have grids displayed in their associated pageviews. What I would like to do is to make the grids not visible when the page loads, but have them load and display when the user clicks on the tab. The idea is to save the resources of loading the grids until the user actually wants to see them.
I tried setting Visible = false on both grids, then I have this for my AjaxManager (I'm actually using a AjaxManagerProxy because I have a RadAjaxManager on my master page):
where tabMain is my tabstrip and gridCMs is the grid that should appear on the second tab while gridInOpEquip would show on the third tab. Then I added this code to handle the tab_click:
Yes, I did try just making it visible without the call to DataBind. When I have this code enabled, the code executes but the tab is no longer selected, so I can't even see the selected pageview. If I comment out this code, and change the grids from Visible=false to Visible=true, it works just fine...except that I don't have the delayed loading of the grids.
I look forward to any tips that you can provide. Many thanks!
x
I tried setting Visible = false on both grids, then I have this for my AjaxManager (I'm actually using a AjaxManagerProxy because I have a RadAjaxManager on my master page):
| <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="gridCMs"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="gridCMs" LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="gridInOpEquip"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="gridInOpEquip" LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="tabMain"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="gridCMs" LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="gridInOpEquip" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManagerProxy> |
where tabMain is my tabstrip and gridCMs is the grid that should appear on the second tab while gridInOpEquip would show on the third tab. Then I added this code to handle the tab_click:
| Protected Sub tabMain_TabClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTabStripEventArgs) Handles tabMain.TabClick |
| Select Case e.Tab.Value |
| Case "OpenCMs" |
| If gridCMs.Visible = False Then |
| gridCMs.Visible = True |
| gridCMs.DataBind() |
| End If |
| Case "InOpEquip" |
| If gridInOpEquip.Visible = False Then |
| gridInOpEquip.Visible = True |
| gridInOpEquip.DataBind() |
| End If |
| End Select |
| End Sub |
Yes, I did try just making it visible without the call to DataBind. When I have this code enabled, the code executes but the tab is no longer selected, so I can't even see the selected pageview. If I comment out this code, and change the grids from Visible=false to Visible=true, it works just fine...except that I don't have the delayed loading of the grids.
I look forward to any tips that you can provide. Many thanks!
x