homebizseohomebizseocom
New Member
I am using AJAX TabContainer and have an asp GridView in each tab which is bound to an ObjectDataSource. The ObjectDataSource returns different objects based on the tab selected (TabContainer AutoPostBack="True"). I bind the ObjectDataSource to the GridView based on the tab selected during TabContainer Load in the code behind only if IsPostBack because on the first load the TabContainer is not visible. I do not bind the GridView anywhere else. The fields in the GridView are Eval instead of Bind because the parameters are added to the ObjectDataSource dinamically.When I update the GridView, I am not able to see e.OldValues. If the fields in the GridView are set to Bind, I am able to retrieve e.NewValues nut e.OldValues is still empty...Does anyone know what the deal is?\[code\]<asp:ObjectDataSource ID="odsEquipment" runat="server" TypeName="EquipmentDB" SelectMethod="GetEquipment" SortParameterName="sortExpression" UpdateMethod="UpdateEquipment"> <SelectParameters> --Params </SelectParameters> <UpdateParameters> --Params </UpdateParameters></asp:ObjectDataSource><asp:TabContainer ID="tcDisciplines" runat="server" CssClass="ajax_tabController" ScrollBars="Horizontal" AutoPostBack="True">--Tabs and GridViews with no properties\[/code\]Code Behind:\[code\]Protected Sub tcDisciplines_Load(sender As Object, e As EventArgs) Handles tcDisciplines.Load If IsPostBack Then For Each discipline In disciplineList tcDisciplines.Tabs(discipline.ID).HeaderText = discipline.Discipline tcDisciplines.Tabs(discipline.ID).TabIndex = discipline.ID Dim gv As GridView = TryCast(tcDisciplines.Tabs(discipline.ID).Controls(0).FindControl("gv" + discipline.Abbr), GridView) gv.Visible = False If tcDisciplines.ActiveTabIndex = discipline.ID Then gv.Visible = True 'Set properties End If Next End IfEnd Sub\[/code\]