Home All Groups Group Topic Archive Search About

Finding the Column Name

Author
29 Jun 2005 4:17 PM
Thomas Beyerlein
Hello, I am looking it for a way of getting the column name, from a
datagrid when the user clicks on one of the cells. I can get the value
and the row Number and column Number, but can not seem to find the event
that will give me the column name that was selected.

Thanks
Tom


*** Sent via Developersdex http://www.developersdex.com ***

Author
29 Jun 2005 4:36 PM
Herfried K. Wagner [MVP]
"Thomas Beyerlein" <tb***@yahoo.com> schrieb:
> Hello, I am looking it for a way of getting the column name, from a
> datagrid when the user clicks on one of the cells. I can get the value
> and the row Number and column Number, but can not seem to find the event
> that will give me the column name that was selected.

If your data source is a 'DataTable', you can determine the name using
'MyDataTable.Columns(i).ColumnName'.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
29 Jun 2005 4:58 PM
Thomas Beyerlein
Thanks

Tom

*** Sent via Developersdex http://www.developersdex.com ***