Interactive sex chat bot - Gridview rowediting vs rowupdating

This argument provides the new page number that the user has selected via a property called New Page Index.

We set Page Index property of the Grid View to this new page number and call the Bind Grid() method again.

We need to access this variable from Bind Grid() method so that our sorting will work correctly under all the circumstances. The following figure shows the Grid View after implementing sorting.

gridview rowediting vs rowupdating-57

Since we are not using data source controls we need to handle the toggling of the sort direction on our own. Add the following code in the Sorting event handler.

Here, we store the value of Sort Expression property into a Veiw State variable called sortexpression. Finally, we call Bind Grid() method which will bind sorted version of the Data View with the grid.

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.

Once you set these properties you will find that the column headers of all the columns for which you specified Sort Expression property appear as clickable link buttons.

aspdotnet-suresh offers C#articles and tutorials,csharp dot net,articles and tutorials, VB.

string connetion String = "YOUR_CONSTR" ; string upd Stmt = "UPDATE Quantity set [email protected]_pro4, [email protected]_pro5, [email protected]_profile5 " "where [email protected] Name"; using (Sql Connection cnn = new Sql Connection(connetion String)) I have tested this code, and it reads the table, and allows the edits of the records.

The Sort Expression property supplies the sort expression that you specified earlier for the column being sorted.

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.

Tags: , ,