Note that there are some explanatory texts on larger screens.

plurals
  1. POObservableCollection and IDataErrorInfo with a XML file
    primarykey
    data
    text
    <p>MainWindow() and GetXmlData() work fine and display the xmlfile on gridview. But when I include the XmlNode :IDataErrorInfo class, it stops working. </p> <p>I like to get all of them to work to display and validate the gridview. Anyone could spot anything I miss? Or explanation, I'm hitting a stop here. It seems like an error between observablecollection.</p> <pre><code> public MainWindow() { InitializeComponent(); RadGridView testGrid = new RadGridView(); testGrid.ItemsSource = GetXmlData(); testGrid.AutoGenerateColumns = false; GridViewDataColumn col1 = new GridViewDataColumn(); col1.DataMemberBinding = new Binding("JobKey") { ValidatesOnDataErrors = true, NotifyOnValidationError = true }; testGrid.Columns.Add(col1); LayoutRoot.Children.Add(testGrid); } private static object GetXmlData() { XmlDocument doc = new XmlDocument(); doc.Load(@"c:\\JobSetupFile.xml"); XmlDataProvider provider = new XmlDataProvider(); provider.IsAsynchronous = false; provider.Document = doc; provider.XPath = "JobSetup/JobParameters"; return new ObservableCollection&lt;XmlNode&gt;((IEnumerable&lt;XmlNode&gt;)provider.Data); } public class XmlNode : IDataErrorInfo { public string JobKey { get; set; } public XmlNode() { } public string Error { get { throw new NotImplementedException(); } } public string this[string columnName] { get { string result = string.Empty; if (columnName.Equals("JobKey")) { if (JobKey.Where(s =&gt; Char.IsLetter(s)).Count() != JobKey.Length) result = "Invalid name format. Name should contain letters only"; } return result; } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload