Requirement: While loading the page, I need to fill up the combo box with building numbers. Therefore, i used query task.
My concern: Is there any way so that we can convert query task result to datatable without looping the featureset.
Private Sub QueryTask_ExecutComplete(ByVal sender As Object, ByVal args As ESRI.ArcGIS.Client.Tasks.QueryEventArgs)
{
Dim enumGraphics = From g In args.FeatureSet
Order By (TryCast(g.Attributes("BLDNBR"), String)) Ascending
Select g
Dim _BuildingList As New List(Of BuildingInfo)
For Each gn As Graphic In enumGraphics
_Building = New BuildingInfo() With {.BLDRECNBR = gn.Attributes("BLDRECNBR").ToString, .BLDNBR = gn.Attributes("BLDNBR").ToString}
_BuildingList.Add(_Building)
Next
}
I would like to eliminate the above for loop. In ASP.NET we used to do as below.
Dim queryResultsDataTable As System.Data.DataTable = Nothing
queryResultsDataTable = commonQueryFunctionality.Query(commonQueryFunctionality.Name, layerIDs(i), adfQueryFilter)
Really appreciate your help.