nishant ranjan

nishant ranjan

  • NA
  • 390
  • 0

groupby in datatable

Jun 24 2013 8:01 AM
ds_update.ReadXml(strOutPath + @"\backup.xml");      //ds_update is dataset     


data contained is

eid     mid     path
112     500    xyz
112      501   abc
113     500    ddd
113     500    aaa
113   600      uuu

what i want is     result as 
mid
500        3
501         1
600        1
how can i use group by in datatable.select
DataRow[] results = ds_update.Tables[0].Select(?????????);
            foreach (DataRow dr in results)
            {
               
            }
i want each mid with no of times its occurrence

Answers (15)