1pvd international dating - Gridview1rowupdating dropdownlist

You can sort the data in ascending or descending order based on the contents of the specified column.Also you can see the Data Grid View sorting when user clicks on the column header.The following C# program shows how to filter and sort a Data Grid View by using a Data View.

This means that on read-only state the Label will be displayed and on edit-state the Drop Down List will be displayed to allow users to modify the selection of their choice.

Note that you need to set Auto Post Back to TRUE for the Drop Down List to trigger the Selected Index Changed event.

You may notice that we set this field as the Data Key Name in the Grid View so we can easily reference the ID of the row later on.

The 2nd and 3rd columns are Template Fields that contains a Label control within an .

Here are the code blocks below: The Get User Product Order() fetches all the list of orders.

We will use this as our Data Source in the Grid View later.

ASPX Markup: In this post will take a look at how to possibly do this. For the simplicity of this demo, I just set it up like this: The markup above composed of 6 columns of different type of control fields.

The first column is a Bound Field which holds the Product Order ID field.

In the above code , datagridview sort the title column thats 1st column. You can sort data while retrieving it from database using order by clause or you can use the following method.

Tags: , ,