Filter results from a data table c#
ex: get unique values of a coloumn ,
DataView view1 = new DataView(datatable1);
distinctValues1 = view1.ToTable(true, "user");
DataRow[] values1 = distinctValues1.Select(" ");
int numberofitems= values1.Count(); //this gives you count of unique rows
you can access info of that unique rows from values1 array .
ex: get unique values of a coloumn ,
DataView view1 = new DataView(datatable1);
distinctValues1 = view1.ToTable(true, "user");
DataRow[] values1 = distinctValues1.Select(" ");
int numberofitems= values1.Count(); //this gives you count of unique rows
you can access info of that unique rows from values1 array .
Comments
Post a Comment