Doubt in Dataview filter options
-
I have two dataset. Each datasets contain one table . Dataset1.Tables[0]; ---------------------------- Id Description 100 Raja 101 Jayaraj 102 Ramesh 103 Mani 104 kavitha Dataset2.Tables[0] ----------------------------- Id UpdatedWhen 100 05/06/07 104 01/09/00 How can i filter the above datasets columns by using DataView? The result should be like this Id Description 101 Jayaraj 102 Ramesh 103 Mani The result going to bind in DropDownList , like this Jayaraj Ramesh Mani Pls give the code ASAP
-
I have two dataset. Each datasets contain one table . Dataset1.Tables[0]; ---------------------------- Id Description 100 Raja 101 Jayaraj 102 Ramesh 103 Mani 104 kavitha Dataset2.Tables[0] ----------------------------- Id UpdatedWhen 100 05/06/07 104 01/09/00 How can i filter the above datasets columns by using DataView? The result should be like this Id Description 101 Jayaraj 102 Ramesh 103 Mani The result going to bind in DropDownList , like this Jayaraj Ramesh Mani Pls give the code ASAP
Navigate through the Dataset2.Tables[0] records and have the collection of ID in a string. write something similar to this...
For Each drow In Dataset2.Tables(0).Rows Str = Str + drow("ID") + "," Next str.Remove(lstr.Length - 1, 1)
To filter the recordsDim dv As DataView dv = Dataset1.Tables[0].DefaultView dv.RowFilter = "ID NOT IN (" + str + ")"
Regards
J O H N :rose:
"Even eagles need a push." David McNally