views:

15

answers:

0

Hi, I would like to get a cell value on rowupdating event (or any event) of the gridview, based on a text key, rather than using an index. Is this possible? for example instead of saying GridView1.Rows[e.RowIndex].Cells[0].Text, I would like to say something like GridView1.Rows[e.RowIndex].Keys["CustomerId"].Value, so that even if I rearrange the columns, I still get the correct data. Is this possible to achieve without using Template Columns? I don't want to use DataKeys here, because I just want to grab the data that is displayed in the grid, not some hidden Id.