asp.net - .NET GridView Updating, e.OldValues is empty -


i using ajax tabcontainer , have asp gridview in each tab bound objectdatasource. objectdatasource returns different objects based on tab selected (tabcontainer autopostback="true"). bind objectdatasource gridview based on tab selected during tabcontainer load in code behind if ispostback because on first load tabcontainer not visible. not bind gridview anywhere else. fields in gridview eval instead of bind because parameters added objectdatasource dinamically.

this bulk update gridview of fields editable. when update gridview, not able see e.oldvalues. if fields in gridview set bind, able retrieve e.newvalues nut e.oldvalues still empty...

does know deal is?

<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 , gridviews no properties 

code behind:

protected sub tcdisciplines_load(sender object, e eventargs) handles tcdisciplines.load     if ispostback         each discipline in disciplinelist             tcdisciplines.tabs(discipline.id).headertext = discipline.discipline             tcdisciplines.tabs(discipline.id).tabindex = discipline.id              dim gv gridview = trycast(tcdisciplines.tabs(discipline.id).controls(0).findcontrol("gv" + discipline.abbr), gridview)             gv.visible = false              if tcdisciplines.activetabindex = discipline.id                 gv.visible = true                  'set properties             end if         next     end if end sub 

found little tutorial on msdn, http://msdn.microsoft.com/en-us/library/aa992036.aspx#y3473 work-around helped me. used session instead list of rows.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -