You can also indicate whether the exception was handled in the event-handling method by setting the On Row Updated Row Canceling Edit On Row Canceling Edit Row Deleted On Row Deleted Row Deleting On Row Deleting Row Editing On Row Editing Row Updating On Row Updating Grid View Class System. In my VB Gridview, I had bind several column from datatable into one single column of the gridview. The following is the VB code: Protected Sub Grid View1_Row Editing(By Val sender As Object, By Val e As Grid View Edit Event Args) 'Set the edit index. Bind Data() End Sub Protected Sub Grid View1_Row Canceling Edit(By Val sender As Object, By Val e As Grid View Cancel Edit Event Args) 'Reset the edit index. Edit Index = -1 'Bind data to the Grid View control.
Quick google search guided me to move the event to Row_Created event and every thing is okay . Thanks a tonne in Advance and any inputs will be valued and appreciated . I do notice that if I break within the Grid View1_Row Data Bound event during a refresh of the page, the values are there. After this i have got Edit/Delete button on the extreme Left of the Gridview followed by my Autogenerated columns from the database(Column0 , Column1 , Column2).I have written following code in Code Behind : to check what happens on the click of Update however i was surprised to c that this event is actually not called n hence is not executed !!And i think binding function is passing the values back. For example, the current data is: name: Blake, phone: 123-234-3456, email: [email protected], contact Id: 22 I type in new data: name: John, phone: 555-555-5555, email: [email protected], contact Id: 22 Data that ends up in the database: name: Blake, phone: 123-234-3456, email: [email protected], contact Id: 22 When you raise the Row Updating event your basically getting the values BEFORE the Grid View updates the row.Yes i am updating only that row which becomes editable. I guess there is something wrong with the body of Grid View1_Row Updating method.When you clik the edit button ,only the row in which you clicked Edit button becomes editable. So, i guess you should write the code to update only that row. Whenever you post a thread in a daniweb and you are expecting a reply.This is basically so you can cancel the update operation.To get what you've type in I think you need to get the new values (the Dictionary e. In your case you can use it something like this (assuming name, phone and email are what they're called in your gridview): NOTE: If you're simply using this to get the values typed in to update your database then you're better of binding the datagrid and use the value after that to ensure you definitely have the same values in the datagrid as to what you put into the database.When you clik the edit button ,only the row in which you clicked Edit button becomes editable. So, i guess you should write the code to update only that row. Hii, I right click on the Gridview and in the properties i have set the Autogenerated Edit/Delete button to True . help plz cya Rohan How did you load the script for the first time.Answer to my above questions and i will solve the problem quickly. In the smart Tag i have added the Rowupdating event..u can c in the code i have posted above..... My gridview structure is like : Edit/Delete ID NAME PRICE So my id column is my cell or cell ????? You must have forgotten to add Grid View1_Row Updating event to the Grid View.