Get datakey value gridview rowupdating event my dating place los angeles
In this example, I am going to retrieve values from categories table of Northwind database.Drag a Grid View into the Web Form and assign Data Key Names property with the primary key column i.e.I'm using a sqldatasource control to populate the grid and want to write the update code in the Row Updating event.I can get the value of the first field using " Select Command="SELECT @Week Ending Week Ending , Project , Project ID , Category , Category ID ,isnull(, 0) Sun ,isnull(, 0) Mon ,isnull(, 0) Tue ,isnull(, 0) Wed ,isnull(, 0) Thu ,isnull(, 0) Fri ,isnull(, 0) Sat from (select P.
Fire Grid View's Row Editing event for Link Button Edit.
For this situation, many developers use invisible columns (Hidden columns) in the gridview to identify that row.
We can achieve the same functionality using Datakeys.
Some days back I got a query from one of my fellow, regarding a very normal situation I mean that’s the day to day task that we as a developers are doing.
Here is the scenario Scenario: Consider you have a data grid view which show a list of products from northwind database and you want a link button which will edit the same grid view entry but in a separate page and on separate form with the help of the primary key which you may want to send to another page using query string or else.