How to get column name.....

using the DataSet Tables to find out...

This will work on any clicked cell
Visual Basic:
    Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs)
	messagebox.show(dataset1.Tables(0).Columns(Datagrid1.CurrentCell.ColumnNumber).ColumnName.ToString)
    End Sub
 
Back
Top