Hi all
I know the title is a bit generic but the question is not
OK I have a dynamic GridView on which is a control (A checkbox)
When I click this check box I need to get the data key of the row on which the checkbox is on
The reason for this is that I have a search on the grid view so the row index can change depending on the search.
I have dynamically set the Datakeys in on the gridview in the page load to
GridView2.DataKeyNames = new string[] { "obji" };
but this has no efect as I still can not access the datakeys
code snip
private void BindGridView(DataTable GV2data)
{
//we only want to bind once
BindMonitor++;
if (BindMonitor < 2)
{
//Iterate through the columns of the datatable to set the data bound field dynamically.
foreach (DataColumn col in GV2data.Columns)
{
...
Go to the complete details ...