It seems that its not getting the oldvalues and returns a null, which is something strange. If you are not using a 'standard' datasource New/Old Values are not always available in the Row Updating event.
I would greatly appreciate for any help or suggested ideas/approach in order to accomplish this task, or any sample codes snippet. Null Reference Exception: Object reference not set to an instance of an object...".
I am using a Grid View to display a dataset with no binding to an SQLdatasource. There is a code snip posted on the net that is supposed to take care of that. d) I set Data Member="Default View" I am not sure what am I missing.
New Values collection coming from the Grid_Row Updating Event is Empty. I am trying to access new Values in rowupdating event. I have a) datakeynames property set b) I am using template fields in my gridview and have "EVAL" for Item Template and "BIND" for Edit Item Template c) I have datasource ID and update statement set.
From this Use Net thread apparently the collections are only available when using the datasource controls or the objectdatasource. Now on clicking update link it fires Row Updating method and there i found e.newvalues.count = 0. Thank you for taking interest in this matter Allen. I have Gridview in my page and i am trying to edit information with in grid. Thank you, Bhavin Gajjar Excuse me for my tardiness - I was on a vacation. Here is some relevant code - this is the Grid in - nothing specified so if any changes occur in the underlaying DB no aspx changes will be required (the idea that is being tested) That should give you back a valid Values collection. We are working on developing a methodology to port our old but good VB6 App to ASP and I am on a learning curve here so I am sure I have missed something (hopefully! This is just exploration for now so I can develop all the tools for the job at hand.
Ok This is the settings: I use a Viewgrid with only itemtemplate colums for example. In Grid View Row Updating method, New Values collection is empty I am having a problem with the Grid View.