Search for a value in a dataset/datatable
I have Dataset DS.
I have Datatable DT.
I have column ValueA, ValueB, ValueC in the DT.
Now I want to input ValueA and ValueB and return ValueC.
Found this option:
DS.DT.Rows.Find(expression)
but it requires primary keys, don't have them yet.
Found this option:
DS.DT.Select(expression)
But when I use this code:
Dim myrow() As DataRow
myrow = DS.DT.Select("ValueA = '23' and ValueB = '26'") DataGrid2.DataSource = myrow
Then it returns the 'layout' of myrow;
RowError RowState ItemArray HasErrors Table
Any idea on how to get ValueC in a string or integer from myrow?