GridView DataKeyNames:
DataKeyNames is an array collection of data key fields or you can say primary keys specified in the GridView control retrieved from the SQL database table that can used to uniquely identify the record. For example you want to edit any record using Gridview control then to pass the unique id to sql command to execute and edit the requested record, you can retrieve that id from the DataKeyNames collection of the GridView.
GridView DataKeys:
To get the value of data key field for any particular row of GridView control using C# code you can use DataKeys array by passing the rowIndex of GridView control to get the unique identity of that record.
GridView FindControl:
FindControl function is used to find any control by its server ID reference. Using FindControl function you can find the nested GridView control from the ItemTemplate cell of any row of ASP.Net GridView control.
To work with nested GridView Control you can use the Northwind database of SQL Server 2000. Consider the sql database tables categories and products to display the records. For example, you can display the category names as Title and related products in the nested GridView.
Where is the code or source file? Don't write article if you cannot...
ReplyDeleteExactly..
DeleteC# GridView
ReplyDeleteWhere is the code???
ReplyDelete