I have a row of data that I need to modify in a database, using a stored procedure. But in order to call that stored procedure, I need to know the name of the each column. How do I determine the name of the columns? (Hardcoding is not an option as we are talking a LOT of columns whose names may change).
EDIT: given the accepted answer, it looks like eviljack wanted the header text of the column and not the name of the bound field
To get the header text of the column you can use this:
string colText = grid.Columns[i].HeaderText;
Where i is the index of the column.