When I use the dataview.rowfilter and I try to display the field value of
the first row, the code doesn't seem to show the first row AFTER the
rowfilter (it displays the value of the first row of the dataview without the filter).
This is my code:
DataView DataView_Filter = new DataView();
DataView_Filter.Table = DS_States.Tables["Table1"];
sFilter = "Emplcode = '123233'";
DataView_Filter.RowFilter = sFilter;
MessageBox.Show (DataView_Filter.Count.ToString()); //it displays 6 items, which is correct.
//it displays the first item of the initial dataview, not the filtered dataview
How can I display the first item of the filtered dataview? I assume there
must be some method that returns the array index since Rows is not
necessarily the first row of the filtered dataview.