Click here to Skip to main content
16,012,110 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how do filter datatable in c# to match criteria
Posted
Updated 7-May-14 1:25am
v3

string filter = "Active='A'";

DataView view = new DataView(dtable);
view.RowFilter = filter;
dtable = view.ToTable();
 
Share this answer
 
You can not filter a DataSet, but single DataTables in it. Please read this: http://msdn.microsoft.com/en-us/library/1ay5y4w0(v=vs.71).aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900