skip to content »

Find control in rowupdating event

find control in rowupdating event-38

In this method, I am specifying the Edit Index property of the Grid View to -1.

In practical scenario you should use your existing architecture to populate and update the data.NET Grid View control and how to implement Insert, Edit, Update, Delete, Paging and Sorting functions in ASP. We have received many posts in forums about this popular web control, so this sample provides a complete sample for showing how to implement these basic functions of this control.The sample demonstrates data source from both database and memory.I have specified Data Key Names as Auto ID, the primary key of the database table.Then I have several methods attached with following events Get video of hundreds of ASP. On Row Editing - Edit Record On Row Cancel Edit - Cancel Record On Row Updating - Update Record On Row Deleting - Delete Record As I set Auto Generate Columns property to false so I am going to manually write the fields name that I need to appear in the way I want.So I have to specify how I want them to appear in the normal view and edit view.

That’s why I have placed different templates like Item Template (for normal view) and Edit Item Template (for edit view).

With the help row variable, I am going to find all the controls placed under that row in edit mode using Find Control property.

After finding the controls I am using them to pass their values to the parameter of the Sql Command object that is ultimately updating the records into database.

In this article, I am going to explain how to manipulate data using Grid View control.

This article scope is limited to Updating and Deleting records using Grid View and I am not using any readymade Data controls for that but manually writing all event methods.

Connect me on | | Hello....