Datagrid doesn't see restrictions on datatypes

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

Hi

I have the following XML Schema

<xs:element name="MotionParameters">
<xs:complexType>
<xs:sequence>
<xs:element name="FeedRateMAX" >
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minExclusive value="0.0"/>
<xs:maxExclusive value="1000.0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="PlungeRateMAX" type="xs:double"
minOccurs="0" />
<xs:element name="TravelRateMAX" type="xs:double"
minOccurs="0" />
<xs:element name="TravelRate" type="xs:double" minOccurs="0" />
<xs:element name="PlungeRate" type="xs:double" minOccurs="0" />
<xs:element name="FeedRate" type="xs:double" minOccurs="0" />
<xs:element name="JogSpeedMode" type="xs:integer"
minOccurs="0" />
<xs:element name="SeekXYSpeed" type="xs:double" minOccurs="0" />
<xs:element name="SeekZSpeed" type="xs:double" minOccurs="0" />
<xs:element name="JerkGrate" type="xs:double" minOccurs="0" />
<xs:element name="AccelerationG" type="xs:double"
minOccurs="0" />
<xs:element name="AccelMAX" type="xs:double" minOccurs="0" />
<xs:element name="JerkMAX" type="xs:double" minOccurs="0" />
<xs:element name="CentripetalG" type="xs:double" minOccurs="0"
/>
<xs:element name="BrakeG" type="xs:double" minOccurs="0" />
<xs:element name="ArcError" type="xs:double" minOccurs="0" />
<xs:element name="MinLength" type="xs:double" minOccurs="0" />
<xs:element name="CornerPause" type="xs:double" minOccurs="0" />
<xs:element name="StartPause" type="xs:double" minOccurs="0" />
<xs:element name="JerkFactor" type="xs:integer" minOccurs="0" />
<xs:element name="CentripetalAcceleration" type="xs:double"
minOccurs="0" />
<xs:element name="LinearAcceleration" type="xs:double"
minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>

I read the schema in using a dataset as in the following:

dsMachineParameters = new DataSet("MachineParameters");
mydatagrid = new DataGrid();
mydatagrid.DataSource = dsMachineParameters;
dataGridView1.Controls.Add(mydatagrid);
try
{
dsMachineParameters.ReadXmlSchema(xmlSchemaPath);
dsMachineParameters.ReadXml(xmlPath);

mydatagrid.Controls.Clear();
}
catch (Exception err)
{

MessageBox.Show(err.Message);
return;
}

I am still able to set values outside the range I set for FeedRateMAX?
How do I make the grid understand the restrictions I have put on this value?
I still able to change this value in the grid outside of the range I have set.
 
Hi

I am not sure if I am asking this question in the right discussion group. I
previously posted it in the .NET XML General Discussion group. They
confirmed that my xml schema syntax is correct. But as for the DataSet and
Datagrid understanding the restrictions they could not comment. They
suggested that I posted on this discussion group. I noticed that the post
hasn't been answered in a couple of days. Is this the right spot for me to
ask this question? I really need this functionality
 
Back
Top