|
james.cook2@usma.edu -> XmlDataDocument attribute updates via DataSet binding (17 April 2007)
|
I am attempting to do something which is exceptionally simple, but also apparently exceptionally undocumented; I am trying to write a Windows Forms application using an XmlDataDocument to manage a simple xml document, with most of the user interface data-bound to the XmlDataDocument's DataSet. I have had reasonable success up to this point, considering a complete absence of documentation for any use of XmlDataDocument other than the extraction of data from a preexisting DataSet. I have now come up against a very frustrating behavior though. Simply put, I am trying to detect when the value of an XML element's attribute is changed by the user interface (by a DataGridView via an attribute-mapped column, specifically). I have registered for every XmlDataDocument event, and traced extensively. What I find is that the only event that is reported is the insertion of a text node into an attribute node that has no parent. There is never a subsequent event for the insertion of this attribute node into any element node, nor for the removal of any existing attribute node. Is this an XmlDataDocument bug, or a "feature" that I'm missing? Or am I approaching things in a fundamentally wrong way? I could, for example, watch the DataSet for events, but this 'simple' modification, in this case, generates about 200+ DataSet events for a relatively small document (due to a relation for which the attribute I'm watching is the parent key), none of which seems to be a simple representation of the change I want to detect. Thanks in advance, James Cook
|
|
|
|