I have been trying to update the Feature layer and bind it to the FeatureDataGrid on Button Click event but when I try to execute following Code the Feature just disappear and FeatureDataGrid Header row is get update and no rows are shown.Thank you in advance and please help me out bcoz i am trying this from last 6 months.
string type = "Capacity";
FeatureLayer lyr = Map.Layers["Reservoirs"] as FeatureLayer;
lyr.ClearGraphics();
lyr.Url = "http://Dummy/ArcGIS/rest/services/Dummy/FeatureServer/3";
yr.Where = "Res_Type = 'GLR'";
lyr.OutFields.Add("*");
lyr.Update();
System.Windows.Data.Binding bind = new System.Windows.Data.Binding();
bind.ElementName = "Map";
bind.Path = new PropertyPath("Layers.[Reservoirs]");
MyDataGrid1.SetBinding(ESRI.ArcGIS.Client.Toolkit.FeatureDataGrid.GraphicsLayerProperty, bind);
MyDataGrid1.UpdateLayout();