Modify field at gridview1 rowupdating event

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.Fortunately Grid View can also be used without attaching with the Data Source Controls. In this article we will see how paging, sorting and editing can be implemented in a Grid View control that is bound with a Data View (or Data Table) directly.The Data View supplies all the records from the Employees table.In order to implement paging you need to set Allow Paging property of the Grid View control to True. There are two events of Grid View that are related to paging.By default this field renders a link button titled Edit.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.The Bind Grid() method is our own function that we will create later on.The method essentially binds the Grid View with a Data View.

We set Page Index property of the Grid View to this new page number and call the Bind Grid() method again.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.Simple Insert, Select, Edit, Update and Delete in Asp. – The above block of codes in Row Updating event, finds the control in the Grid View, takes those values in pass it to the Customers Cls class Update method. There are many articles and tutorials around that illustrate the use of Grid View control along with the new Data Source Controls.

Search for modify field at gridview1 rowupdating event:

modify field at gridview1 rowupdating event-51modify field at gridview1 rowupdating event-89modify field at gridview1 rowupdating event-33modify field at gridview1 rowupdating event-86

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “modify field at gridview1 rowupdating event”