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
245
Reload grid on web tab click
posted

I have this webtab:

<ig:WebTab ID="WebTab1" runat="server" Height="700px" Width="100%">
    <PostBackOptions EnableLoadOnDemand="true" EnableAjax="true" />
    <Tabs>
        <ig:ContentTabItem runat="server" Key="Users" Text="Users" ContentUrl="users.aspx">  
        </ig:ContentTabItem>
        <ig:ContentTabItem runat="server" Key="Offices" Text="Offices" ContentUrl="offices.aspx">                
        </ig:ContentTabItem>    
        <ig:ContentTabItem runat="server" Key="Management" Text="Management" ContentUrl="management.aspx">                
        </ig:ContentTabItem>   
    </Tabs> 
</ig:WebTab>

Each of the aspx pages have a pretty simple grid (example below) on it. I need the grid to reload each time a user clicks a tab. While one user is changing data on the offices page another user could be changing data on the users page. We need to be reloading the grid each time the tab is clicked.

<ig:WebDataGrid ID="grdMain" DataKeyFields="OfficeID" EnableAjax="False" AutoGenerateColumns="False" runat="server" BorderStyle="Solid" BorderWidth="1px" BorderColor="DarkGray" BackColor="#F2F2F2" Height="300px" Width="100%">
  <Columns>
     <ig:BoundDataField DataFieldName="OfficeAddress" Key="OfficeAddress">
         <Header Text="Address" />
     </ig:BoundDataField>
     <ig:BoundDataField DataFieldName="OfficePhone" Key="OfficePhone">
         <Header Text="Phone" />
     </ig:BoundDataField>
  </Columns> 
</ig:WebDataGrid>

Thanks, Pat

Parents
  • 29417
    Verified Answer
    Offline posted

    Hello Pat, 

    Thank you for posting in our forum. 

    You can implement this functionality using the web tab’s SelectedIndexChanging client-side event by refreshing the related iframe of the selected tab, for example:

     
    <ig:WebTab ID="WebTab1" runat="server" Height="700px" Width="100%">
    <ClientEvents SelectedIndexChanging="WebTab1_SelectedIndexChanging" />
    …

     

    function WebTab1_SelectedIndexChanging(sender, eventArgs)
    {
     
        var index = eventArgs.get_tabIndex();
        var tab = sender.getTabAt(index);
        var iframe = tab.get_iframe();
        iframe.contentWindow.location.reload();
    }

     Let me know if this would solve your issue. 

    Regards,

    Maya Kirova

Reply Children
No Data