Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
739
Page loading twice when new tab selected
posted

I just switched from the old tab control and I am having this problem.  I have a WebTab and on each tab I have either a WebDataGrid or an UltraWebGrid.  When the user clicks a tab, the grid in that tab should load.  It works except that when I change tabs, I get two async postbacks.  I can't figure out why this is happening.   The WebTab has the following options:

 

        <ig:WebTab ID="WebTab1" runat="server" Height="" Width="100%"
            onselectedindexchanged="WebTab1_SelectedIndexChanged"
            onprerender="WebTab1_PreRender">

        ...

                    <AutoPostBackFlags SelectedIndexChanged="Async" />
            <PostBackOptions EnableAjax="True" EnableLoadOnDemand="True" />

I'm stumped.

 

 

 

 

Parents
  • 558
    posted

    Hi John,

    If EnableLoadOnDemand  and EnableAjax both these properties are enabled, then on initial load only selected tab is loaded, but on all other postbacks (changes of selected tabs) all previously selected tabs are loaded as well. So strictly speaking that in not 100% LoadOnDemand. That limitation comes from framework of AJAX and event validation. The dot net does not support changes of once asynchronously loaded UpdatePanels: contents of all loaded UpdatePanels must be reloaded on all following async postbacks.

    You can either set the SelectedIndexChanged property to Off or EnableLoadOnDemand property to false depending on the your requirenment to workaround this scenerio.

    Let me know if you have any questions with this matter.

    Neha
    Developer Support Engineer
    Infragistics
    www.infragistics.com/support

Reply Children
No Data