Does your FeatureLayer have OutFields? The FeatureDataForm determines what fields to show based on this.
You need to check for the following in order to identify the problem:
- What is the type of your target layer (e.g. FeatureLayer,...)?
If the target layer is a FeatureLayer then:
- Does it have the same attribute (field) collection?
- Are you setting OutFields property of the target layer?
Also, how are you populating the "copyGraphic" in your source code? Is it a cloned graphic object or it still belongs to your first layer?
From what I see in your code the "copyGraphic" doesn't have any attributes defined (just the Geometry and the Symbol). You need to use Attributes.Add() method of the Graphic object to define and populate corresponding attributes and their values.
Does "myFeatureLayer" in your code have "DPC_ID", "SUBDIVISION", and "KEYMAP" attributes? The reason I'm asking is that FeatureDataForm gets attribute definitions from its associated "FeatureLayer" property and if "myFeatureLayer" doesn't have the above properties in it nothing will show up regardless of your attribute definitions in your "copyGraphic".
FeatureLayer target = this.MyMap.Layers["TargetLayer"] as FeatureLayer;
Graphic graphic = new Graphic() { Geometry = feature.Geometry };
foreach (var field in target.LayerInfo.Fields)
graphic.Attributes.Add(field.Name, null);
target.Graphics.Add(graphic);