I want to find column name in DataGridView
. I have column index. How can I find it.
dGVTransGrid.CurrentCell.ColumnIndex
: I want it's column name.
Plz help.
Thanks.
There may be a better way, but why don't you just ask the DataGridView what the column with that index is called?
int columnIndex = dGVTransGrid.CurrentCell.ColumnIndex; string columnName = dGVTransGrid.Columns[columnIndex].Name;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With