Hello,
We're currently evaluating Infragistics and Telerik ASP.NET toolkits for our dev shop - one of the scenarios we're looking at is loading the contents of a tab on demand (only when selected - so we don't need to load all data on the page load). Looking through the Infragistics documentation and samples, I haven't been able to locate guidance for this...Telerik has a sample performing just what we're looking for at their site in the following demo - http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/loadondemand/defaultcs.aspx.
Is there something similar that Infragistics has to offer?
Thanks,
jerry
Hi Jerry,
UltraWebTab has LoadOnDemand options, but they are available only with enabled AsynMode, which is not compatible with UpdatePanel and does not support AJAX controls as children of ContentPanes.
The new WebTab (Aikido) control which is based on AJAX and has many options related to LoadOnDemand, async mode, ContentUrl, ContentUrl-LoadOnDemand, etc. and all their combinations.
If LoadOnDemand is enabled, then the only content of selected tab is loaded and passed to client. There is no need in extra coding by application:just set a simple bool property. Similar with all other options related to postback: they are bool members of the PostBackOptions class.
<ig:WebTab ID="WebTab1" runat="server" Height="200px" Width="400px"> <Tabs> <ig:ContentTabItem runat="server" Text="Tab 1"> <Template> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> </Template> </ig:ContentTabItem> <ig:ContentTabItem runat="server" Text="Tab 2"> <Template> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> </Template> </ig:ContentTabItem> <ig:ContentTabItem runat="server" Text="Tab 3"> <Template> <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox> </Template> </ig:ContentTabItem> </Tabs> <PostBackOptions EnableLoadOnDemand="True" /></ig:WebTab>
I forgot to mention that alone with LoadOnDemand, WebTab also has option to enable/disable persistance of ViewStates of child controls located in tabs. That is controlled by the EnableLoadOnDemandViewState property, which is enabled by default. So, in example above, on initial load only content of 1st tab will be created on server and passed to client. If user will select 2nd tab, then full postback happens and contents of 1st and 2nd tabs will be passed to client. It means that if user will return back to 1st tab, then no postback will be triggered, but all data entered by user on 1st tab will be available and will persist to all following sessions.
In order to achieve 100% LoadOnDemand and load only selected tab, that option should be disabled. In this case postback will happen on every tab-change and only content of selected tab will be created on server and passed to client. If application needs persistance of fields located in unselected tabs, then it should do that on its own: use database, Session, or similar.If application also will enable PostBackOptions.EnableAjax, then full postbacks will be replaced by async postbacks. Below is example of codes for that.
<ig:WebTab ID="WebTab1" runat="server" Height="200px" Width="400px"> ... <PostBackOptions EnableAjax="true" EnableLoadOnDemand="True" EnableLoadOnDemandViewState="false" /></ig:WebTab>