Rowupdating in asp net

20 Mar

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free.

You'll be able to ask questions about coding or chat with the community and help others.

Description: An unhandled exception occurred during the execution of the current web request.

Please review the stack trace for more information about the error and where it originated in the code. Argument Out Of Range Exception: Specified argument was out of the range of valid values.

Then i want the user to be able to edit any row in the gridview, so i did this: Now I know i hav to use Row Editing event, Row Updating Event, Row Canceling Edit event to make everything work. I hoping someone could point me in the right direction on how to use these 3 events, what syntax/coding should i use to handle these 3 events.

In this example, I am going to retrieve values from categories table of Northwind database. Drag a Grid View into the Web Form and assign Data Key Names property with the primary key column i.e. In the gdview_Row Editing and gdview_Row Deleting event, we have used the below code to retrieve categoryid from datakey of Grid View, int catid = int.

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

event is raised when a row's Update button is clicked, but before the Grid View control updates the row.

This enables you to provide an event-handling method that performs a custom routine, such as canceling the update operation, whenever this event occurs.