Getting the new value in gridview rowupdating event dating directories for christians websites


21-Sep-2016 23:47

getting the new value in gridview rowupdating event-75

adult dating in whitewood south dakota

A couple of days ago I mentioned a project that I’ve been working on that is a bit out of the ordinary as far as Grid Views go.One of the issues I’ve had is that the edit template doesn’t map to the view template very well. You see, the data that gets stored back to the database during the edit could go to two of four different tables.The Sorting event handler receives an event argument of type Grid View Sort Event Args.The Grid View Sort Event Args class has three important properties.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 Cancel property allows you to cancel the sorting operation.This calls for some extra coding from developer's end. As an example we are going to use Employees table of the Northwind database. Add three Bound Fields and a Command Field to the Grid View with the help of Fields dialog (see below).In order to develop a test web form create a new web site in VS. Set various properties of the Bound Fields as shown in the following table: Here, we call Bind Grid() method if the web form is being served as a result of first request.

your web.config would then look like : ui.webcontrols.repeater ui.webcontrols. All samples of course assume you’re doing everything in your page, but I have to do … This will display the corresponding records in the Grid View.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.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.

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.