I've a xml file with an element that contains an optional attribute (it's only available when it's true).In my xsd scheme i use: <xs:attribute name="hit" type="xs:boolean" use="optional" default="false" />I load the xml into a DataSet and set the winGrid datasource to that DataSet. this.newDataSet.ReadXml(xmlFileName, XmlReadMode.Auto);When the xml file is loaded, the cell 'hit' in my Grid is always true. (checkbox checked).
Is there a property for the column 'hit' is need to change ?
I've tried a lot of things, but the cell 'hit' in my Grid remains true.
My guess is that use="optional" makes the boolean values tri-state (true, false, indeterminate/not set), but the DataSet picks it up as typeof(bool). Try setting the column's Style property to 'TriStateCheckBox', which should make the null values appear as indeterminate.