0

In .net project i'm working on a page which contains tab container with 3 tab panels. When i Switch between these tab panels the data is not updating. In first tab panel i have a grid view whose data should be update up on doing operations in other tabs but after doing operations in other tabs and when i return back to first tab it's showing the same results as that are displayed when the page is first loaded. I'm using object data source to bind this grid view. I want to refresh or rebind the grid view of the first tab up on returning to that tab from other tabs. I created 3 different user controls which will load for each tab and those user controls contains grid views and other controls.

it is as follows:

<asp:tabcontainer>
    <asp:tabpanel1>
        user control
    </asp:tabpanel1>
    <asp:tabpanel2>
        user control
    </asp:tabpanel2>
    <asp:tabpanel3>
        user control
    </asp:tabpanel3>
</asp:tabcontainer>

Please help me to solve this problem

Dhaval Marthak
  • 17,246
  • 6
  • 46
  • 68
user2864496
  • 107
  • 3
  • 17
  • Can you post some code (code behind)? There's a few ways to skin this cat. Are you you rebinding when the panel becomes visible? – Stinky Towel Dec 05 '13 at 17:13

2 Answers2

0

You need yo refresh or update the Object data source and then call rebind or Databind function of gridview on tab change event ...

Sajid Hussain
  • 63
  • 2
  • 10
0

I added autopostback=true to the tab container and bound data to gridview in Page_load mehtod of the corresponding tab panel user control.

user2864496
  • 107
  • 3
  • 17