Click here to Skip to main content
15,897,518 members

Comments by Devraj Kapdi (Top 35 by date)

Devraj Kapdi 3-Mar-16 7:00am View    
thank u d@nish it worked for me with little modification for datatable as...

List <datarow> filtered = dtOrderHistotyFinal.AsEnumerable().ToList().OrderByDescending(x => Convert.ToInt32(x["col1"].ToString().Substring(x["col1"].ToString().LastIndexOf("-") + 1))).GroupBy(x => x["col1"].ToString().Substring(0, x["col1"].ToString().LastIndexOf("-"))).Select(x => x.First()).ToList();
Devraj Kapdi 3-Mar-16 6:04am View    
I want it with LINQ in C#
Devraj Kapdi 3-Mar-16 5:52am View    
the datatable containing only single column.
Devraj Kapdi 3-Mar-16 5:45am View    
yes
Devraj Kapdi 1-Sep-15 7:53am View    
I did the same, the angular braces are not displaying here
ID = r.Field int ("CNTM_CONTACT_ID"),
Status = r.Field string ("CNTM_ISACTIVE"),
Date = r.Field datetime ("ActiveDate")