Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine cell clicked

Status
Not open for further replies.

slatet

Programmer
Sep 11, 2003
116
0
0
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top