In the event handler function I have checked for the Command Name property and write necessary code for each of the actions.

The HTML code for the Grid View is as follow : Till now everything looks fine but the problem arises when you run this application.

rowupdating event of gridview in asp net-78

You can see most of the articles and tutorials in many websites teach you the way to bind a Grid View control to the database with some Data Source controls such as SQLData Source, Object Data Source, Access Data Source and even XMLDatasource.

I have a Gridview with Auto Generate Columns="False".

The Data Sources fire *ing events before doing anything (e.g. String, "SP"); In any Data Source, the e parameter's Cancel method lets you stop the Data Source from doing whatever action triggered the event.

the Deleting event fires before issuing a delete) and fires *ed events afterwards (e.g. You could, for instance, validate any data in the Updating event and, if you find a problem, prevent the update by setting the Cancel property to True.

The Grid View is associated with the On Row Command event.

Then in the code behind I have handled the On Row Command event.

" Select Command="SELECT a.tenantcode,, a.fixedrate, a.percentrate, a.percentage, b.locationd, c.status FROM TENANTNEW AS a INNER JOIN LOCATION AS b ON a.

You're accessing so many items without null checks that it could be any number of things. Are you sure all of the controls exist in the cells you're specifying?

I am using a Template Field to display my Edit, Update and Cancel 'buttons' in the first column of the Grid View within respective Item Template and Edit Item Template fields.