Gridview rowupdating commandfield fee datingemail
There are many articles and tutorials around that illustrate the use of Grid View control along with the new Data Source Controls.
When attached with a Data Source control Grid View performs tasks such as paging, sorting and editing automatically i.e. However, at times you require to bind the Grid View with a Data View or Data Table directly.
The Sort Direction property specifies the direction of sorting i.e. This property is not of much when you are sorting the grid on your own.
However, when coupled with data source controls the Grid View can toggle the sorting direction automatically for you and you can get/set the direction using this property.
The Grid View Sort Event Args class has three important properties.
The Sort Expression property supplies the sort expression that you specified earlier for the column being sorted.
The following figure shows the Grid View after implementing paging. First of all, you need to set Allow Sorting property of the Grid View to True.
Further, you need to set Sort Expression property of the Bound Fields to the name of the column on which you would like to sort the grid.
They are: The former event is raised before the current page changes and the later is raised after the page has changed. Write the following code in the Page Index Changing event of the Grid View.Once we click on edit the Grid View raises an event called Row Editing and the Edit link button changes to Update and Cancel link buttons.Clicking on Update link button raises Row Updating event whereas clicking on the Cancel link button raises Row Canceling Edit event.The method essentially binds the Grid View with a Data View.The Data View supplies all the records from the Employees table.