>Hi,
>
>I have a GridView on a web page. I am trying to allow the user to change all rows without having to explicitly click an Edit and Update button. One of the columns contains a combobox. When the value in the combobox changes I need to change some values in other columns on the same row. So in my cboReceiptType_TextChanged method, how do I refer to the grid's current row? At this point in time the Grid's EditIndex is -1 (because I'm not using it).
I found the answer:
protected void cboReceiptType_TextChanged(object sender, EventArgs e)
{
DropDownList thisDropDownList = (DropDownList)sender;
GridViewRow thisGridViewRow = (GridViewRow)thisDropDownList.Parent.Parent;
int row = thisGridViewRow.RowIndex;