I have been trying to find an answer at Silverlight forums and LINQ forums but no luck....I can sort by "officer" no problem....but I want to sort by the IncidentNumber field which is numberic...Cant seem to get it to sort...I tried with no success:- Order By CStr(g.Attributes("IncidentNum")) Ascending
- Order By CInt(g.Attributes("IncidentNum")) Ascending
- Order By CDbl(g.Attributes("IncidentNum")) Ascending
Works for Officer: Dim results2 = From g In featureSet
Order By CStr(g.Attributes("Officer")) Ascending
Group g By GroupKey = CStr(g.Attributes("Officer")) Into r = Group
Select New With {Key .Officer = GroupKey, Key .IncidentNums = r.Sum(Function(i) Convert.ToInt32(i.Attributes("IncidentNum")))}
Does NOT work for IncidentNumber (Map Service Field Name = IncidentNum)
Dim results2 = From g In featureSet
Order By CStr(g.Attributes("IncidentNum")) Ascending
Group g By GroupKey = CStr(g.Attributes("Officer")) Into r = Group
Select New With {Key .Officer = GroupKey, Key .IncidentNums = r.Sum(Function(i) Convert.ToInt32(i.Attributes("IncidentNum")))}