Home Forums WPF controls Xceed DataGrid for WPF Add/Remove Rows using XmlDataProvider

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #22187 |


    I’m binding my DataGridControl to an XmlDataProvider as the ItemsSource. The columns (with associated cell editors) are built on-the-fly in code-behind, since the datasource and its schema are available only at runtime. The data is displayed nicely, and editing works correctly.

    However, I added an InsertionRow to handle adding data, but I get this error:
    “An attempt was made to add a new data item to a source that does not support insertion.”

    I understand from various other posts, that insertion only works if IBindingList is implemented. Are there no other alternatives for those of us who’d like to use an xml data source and still be able to add/remove data? Any working samples?

    Do future enhancements plan to address this scenario?

    Thanks for the help!

    Imported from legacy forums. Posted by Erin (had 2869 views)

    Xceed Support
    Post count: 5658

    At the moment, the only scenario involving XML that would work for sure would be to de-serialize the XML data into CLR objects, mapped into a IBindingList collection and once the work is completed on the data, to serialize the collection back to a XML document.

    For people that work with dynamic XML data (schema unknown initially), this is a prohibitive solution, I know…

    While we had discussions on the subject, we have no short term intentions of supporting insertion/deletion directly into a Xml data source… However, we are planning to broaden the insertion scheme ( refer to post: http://forums.xceed.com/forums/ShowPost.aspx?PostID=5876), which would allow inserting in any data source.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 331 views)

    User (Old forums)
    Post count: 23064

    Any updates on the above – i.e. supporting insertion in any data source?

    Imported from legacy forums. Posted by MP (had 3892 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.