I am having a datatable with the below values
[
Science,Mathematics,Biology,Computer Science,Physics,Active View
False,False,True,True,False
]
I want to get values from the first datarow[0] by matching the true values from datarow[1]
Can anyone help me on this?
c0Ld
(Luís Silva)
#2
[
Science,Mathematics,Biology,Computer Science,Physics,Active View
False,False,True,True,False
]
Are those Headers? Or the values from a column?
Or 2 rows?
It is a datatable with 2 rows.
Yoichi
(Yoichi)
#5
Hi,
Can you try the following expression?
resultStringArray = dt.Columns.Cast(Of DataColumn).Where(Function(dc) dt.Rows(1)(dc).ToString="True").Select(Function(dc) dt.Rows(0)(dc).ToString).ToArray()
Regards,
rahulsharma
(Rahul Sharma)
#6
Not completely sure about the question but are you looking for subject names that are true?
you may consider converting that to dictionary and then get the value
Also we can see there are 6 row headers and 5 row values. is that correct?
Each is a row without a header
system
(system)
closed
#10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.