Hello,
Is there a way to do this? Or does infragistics team has a published documentation of javascript method of its objects?
I mean EnableLoadOnDemandUrl via javascript
Regards,Sherwin
Thank you for clarification.
Hi Sherwin,
The EnableLoadOnDemandUrl is a server feature. If it is not set on server, then all urls are loaded on initialization and any action on client to modify that will come too late and it will have no effect.
If that option is enabled on server and application needs to disable it on client on some event like button click, then application may load all not loaded yet urls by looping through all tabs and setting iframeOf_tabItem.src to the value of tabItem.get_contentUrl() or just resetting content url by
tabItem.set_contentUrl(tabItem.get_contentUrl());
Both will have same effect.
If application had EnabledLoadOnDemandUrl disabled on server and added/modified tabItem.set_contentUrl(newValue) on client and does not want them to load until tab is selected, then application may use optional second param with value true. That will prevent loading url at the time when that property is set.
var tabItem = webTab1.getTabAt(2);tabItem.set_contentUrl('someurl', true);
Application also may force reload of contentUrl, every time a tab is selected, by something like below
<script type="text/javascript">function WebTab1_SelectedIndexChanging(sender, eventArgs){ var index = eventArgs.get_tabIndex(); if(index != 0 && index != 1) return; var tab = sender.getTabAt(index); var iframe = tab.get_iframe(); if(iframe) iframe.src = 'javascript : ""';}</script><ig:WebTab ID="WebTab1" runat="server" Height="307px" Width="422px"> <Tabs> <ig:ContentTabItem runat="server" ContentUrl="Temp1.aspx" Text="Tab 1"> </ig:ContentTabItem> <ig:ContentTabItem runat="server" ContentUrl="Default.aspx" Text="Tab 2"> </ig:ContentTabItem> </Tabs> <ClientEvents SelectedIndexChanging="WebTab1_SelectedIndexChanging" /> <PostBackOptions EnableLoadOnDemandUrl="True" /></ig:WebTab>