I have a datagridview in a winform for my .net application. Using access 07 for db. I am trying to retrieve the name of the selected column but I have found nothing available to assist me. This is what I do on the ColumnheaderMouseClick event :
Code:Dim criteria As Integer criteria = CInt(AllServicesDataGridView.SelectedColumns.ToString) Dim xx As String xx = AllServicesDataGridView.Columns(criteria).HeaderText TextBox1.Text = xx
With this this I get this exception
thanks for all the help.conversion from string "System.Windows.forms.datagridview to type integer is not valid


Reply With Quote
