04 February, 2013

GridView


Data Keys

Data Keys must be present in the datasource of GridView i.e. DataKey must be select statement that is used to populate GridView.

ASP.NET


C#
Object key = GridView1.DataKeys[rowIndex].Value; //For single DataKey
Object key = GridView1.DataKeys[rowIndex].Values["LastName"]; //For Multiple DataKeys


Heading

No comments:

Post a Comment