We are trying to figure out how to determine which cell in a datagrid is clicked. Its actually an infragistics webgrid so I don't know if anyone is able to help. We are creating the grid dynamically and assigning a URL to the cell with the following type of code:
newRow.Cells[j].Tag = "/localhost/statusdetails.aspx";
in the grid click event we try to get the value back out of Tag. We obviously have not continued on with the coding, just trying to retrieve it.
private void DataGridStatus_Click(object sender, ClickEventArgs e)
{
string here = e.Cell.Tag.ToString();
}
We get an object reference not set to an instance of an object. We've tried using other properties such as "key" to save to and retrieve from but that comes back null.
So does anyone know how to determine which cell was clicked in?
Thanks in advance.
newRow.Cells[j].Tag = "/localhost/statusdetails.aspx";
in the grid click event we try to get the value back out of Tag. We obviously have not continued on with the coding, just trying to retrieve it.
private void DataGridStatus_Click(object sender, ClickEventArgs e)
{
string here = e.Cell.Tag.ToString();
}
We get an object reference not set to an instance of an object. We've tried using other properties such as "key" to save to and retrieve from but that comes back null.
So does anyone know how to determine which cell was clicked in?
Thanks in advance.