This[
^] page from MSDN has examples.
You would need a filter expression something like
string filterExp = "Floor = 1";
string sortExp = "";
DataRow[] drarray;
drarray = dataSet1.Rooms.Select(filterExp, sortExp, DataViewRowState.CurrentRows);
(from the first example on the linked page).
NOTE that you get an
Array
of
DataRows
which you will have to decide how to deal with. Either use the Array as it is or add them into another DataTable.
Hope this helps. :)
[Edit]
Incidentally you appear to be coding yourself into a corner because of the way you keep adding features/requirements.
This is how commercial projects become unmaintainable and eventually fail.
I have pointed out a way for you to achieve what you have asked for, given your current code.
It is not, however, the best way to go about this.
The best way would be for a floor to be indicated/selected by the user and then a
Parameterized Query
(google that for more info) should be used to only retrieve the Room data for that floor.
If you are not too far along, you should really stop and list out all the functionality that you want your application to have and then start over, bearing all of those in mind as you go.
[/Edit]