Retrieving dropdownlist gridview rowupdating event

6854933580_2c8b688306_z

This article is one in a series of articles on ASP. Some of these limitations were exhibited in the Updating Basics article when attempting to update a product's Category.

The Grid View 'Grid View1' fired event Row Deleting which wasn't handled. When I say manually databinding I mean not using a data source control specified as a Data Source ID, but rather setting the Grid View’s Data Source equal to the appropriate data object and calling Data Bind. NET 2.0 are familiar with how to deal with this, but since ASP.We will bind C1Combo Box in each row using the Row Data Bound event of C1Grid View.Selected Value property is set to make the C1Combo Box show the value for that particular row from datasource.In this article, I am going to take a simple database table that has following fields: Auto ID - Int, Auto Increment, Primary Key Page Name - Varchar(50) Page Description - Varchar(500) Active - Bit(1) In this article, I am not going to explain the workings of Sql objects but focusing on the events and methods of the Grid View that will help us in updating and deleting the records.Now let’s start with putting the Grid View on page. Data Key Names="Auto ID" Auto Generate Edit Button="True" On Row Editing="Edit Record" On Row Canceling Edit="Cancel Record" On Row Updating="Update Record" Cell Padding="4" Header Style-Horizontal Align="left" On Row Deleting="Delete Record" Row Style-Vertical Align="Top" Fore Color="#333333" Grid Lines="None" In the above code, I have kept Auto Generate Columns as false so that Grid View will not render all the fields of the data source automatically.Likewise, the simplified interface lacks any input validation that may be necessary when editing required fields or fields that must appear in a particular format (like dates or numbers).

You must have an account to comment. Please register or login here!