DataGridView:Child list for field Region cannot be created.

A

Atul Rane

Hi,
I am using datagridview when, I am assigning datasource to Datagridview i am
gettin exception "Child list for field Region cannot be created."

I am Assigning Collection as a datasource to the datagridview.

AnnotationGrid.DataSource = XMLAnnotations;
AnnotationGrid.DataMember = "Region";

and my grid has three coloumns ID, Area, Text and XMLAnnotation consist xml
like that :

<Annotations MicronsPerPixel="0.504000">
- <Annotation Id="1326" Name="" ReadOnly="0" Type="4" LineColor="2293538"
Visible="1" Selected="0" MarkupImagePath="">
<InputAnnotationId>0</InputAnnotationId>
<Attributes />
- <Regions>
- <RegionAttributeHeaders>
<AttributeHeader Id="9999" Name="Region" ColumnWidth="45" />
<AttributeHeader Id="9997" Name="Length" ColumnWidth="70" />
<AttributeHeader Id="9996" Name="Area" ColumnWidth="70" />
<AttributeHeader Id="9998" Name="Text" ColumnWidth="100" />
</RegionAttributeHeaders>
- <Region Id="1326" Type="1" Zoom="0.000000" Selected="0" ImageLocation=""
ImageFocus="0.000000" Length="244.0" Area="3237.0" LengthMicrons="123.0"
AreaMicrons="822.2" Text="" NegativeROA="0">
<Attributes />
- <Vertices>
<Vertex X="23686.000000" Y="20753.000000" />
<Vertex X="23769.000000" Y="20753.000000" />
<Vertex X="23769.000000" Y="20792.000000" />
<Vertex X="23686.000000" Y="20792.000000" />
</Vertices>
</Region>
</Regions>
</Annotation>
- <Annotation Id="1328" Name="" ReadOnly="0" Type="4" LineColor="2293538"
Visible="1" Selected="0" MarkupImagePath="">
<InputAnnotationId>0</InputAnnotationId>
<Attributes />
- <Regions>
- <RegionAttributeHeaders>
<AttributeHeader Id="9999" Name="Region" ColumnWidth="45" />
<AttributeHeader Id="9997" Name="Length" ColumnWidth="70" />
<AttributeHeader Id="9996" Name="Area" ColumnWidth="70" />
<AttributeHeader Id="9998" Name="Text" ColumnWidth="100" />
</RegionAttributeHeaders>
- <Region Id="1328" Type="1" Zoom="0.000000" Selected="0" ImageLocation=""
ImageFocus="0.000000" Length="166.0" Area="1380.0" LengthMicrons="83.7"
AreaMicrons="350.5" Text="" NegativeROA="0">
<Attributes />
- <Vertices>
<Vertex X="23715.000000" Y="20825.000000" />
<Vertex X="23738.000000" Y="20825.000000" />
<Vertex X="23738.000000" Y="20885.000000" />
<Vertex X="23715.000000" Y="20885.000000" />
</Vertices>
</Region>
</Regions>
</Annotation>
</Annotations>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top