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
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
That worked. Thanks Maya!