Column name from value

shers

Well-known member
Joined
Aug 12, 2007
Messages
86
Programming Experience
1-3
Hi,

I have a datarow retrieved from a datatable. I have a value that exists in some column in the datarow. I want to find which column this value is in. How can I achieve this please?

Thanks
 
ForEach dc as DataColumn in ro.Table.Columns
If ro.Item(dc) = "look for" Then Return dc.ColumnName
Next dc
 
Back
Top