title: .NET GridView Updating, e.OldValues is empty
body: <p>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.</p>
  
  <p>This is a bulk update GridView with all of the fields editable. 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...</p>
  
  <p>Does anyone know what the deal is?</p>
  
  <pre><code>&lt;asp:ObjectDataSource ID="odsEquipment" runat="server" TypeName="EquipmentDB" SelectMethod="GetEquipment" SortParameterName="sortExpression" UpdateMethod="UpdateEquipment"&gt;
      &lt;SelectParameters&gt;
          --Params
      &lt;/SelectParameters&gt;
      &lt;UpdateParameters&gt;
          --Params
      &lt;/UpdateParameters&gt;
  &lt;/asp:ObjectDataSource&gt;
  
  
  &lt;asp:TabContainer ID="tcDisciplines" runat="server" CssClass="ajax_tabController" ScrollBars="Horizontal" AutoPostBack="True"&gt;
  --Tabs and GridViews with no properties
  </code></pre>
  
  <p>Code Behind:</p>
  
  <pre><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 If
  End Sub
  </code></pre>