You can do it easily with a bit of javascripting.
Make 3 hidden fields:
<input runat=server type=hidden id=inhAction />
<input runat=server type=hidden id=inhRow />
<input runat=server type=hidden id=inhColumn />
and a javascript function:
function cellClicked(row, column){
myForm.inhAction.value = "CELLCLICKED";
myForm.inhRow.value = row;
myForm.inhColumn.value = column;
myForm.submit();
}
and in the gridview's RowDataBound event setup the javascript call for every
cell:
myCell.Attributes["onclick"]=String.Format("cellClicked({0},{1})",
myCellRow, myCellColumn);
When you click a cell, you will get a postback. You can tell taht the
postback is caused by a cell click by looking in the inhAction and you can
get the row and the column numbers from the inhRow and inhColumn.
Please
vote and
Accept Answer if it Helped.