I post another problem. I would like to retrieve the key value of the row when i click on a control (imageButton) situated in a template column of the row or in the editformtemplate. In the classic aspnet GridView i used this code:
}
Any idea? Thanks in advance.
protected
void ImageButtonTest_Click(object sender, ImageClickEventArgs e)
{
ImageButton imageButton = (ImageButton)sender;
TableCell tableCell = (TableCell)imageButton.Parent;
GridViewRow row = (GridViewRow)tableCell.Parent;
string id = GridViewTest.DataKeys[row.RowIndex].Values[0].ToString();
...
}
Any idea? Thanks in advance.