Hi All
I have a map where i am binding 5 layers at run time(dynamically). i just want to get the DisplayField value of all layers , and want to pass that value to the Query.where for feature search.
my code
if (MyMap.Layers.Count>0)
{
List<string> Ldisplay = new List<string>();
for (int i = 0; i < MyMap.Layers.Count; i++)
{
FeatureLayer myFeatureLayer = MyMap.Layers as FeatureLayer;
ESRI.ArcGIS.Client.FeatureService.FeatureLayerInfo myFeatureLayerInfo = myFeatureLayer.LayerInfo;
Ldisplay.Add(myFeatureLayerInfo.DisplayField.ToString());
}
its giving error "object reference not set to an instance of an object"
finally i have to search features dynamically based on DisplayField property of layer
please help .
Thank You