Binding to DataViewManager

4 posts, 0 answers
  1. Staffan
    Staffan avatar
    2 posts
    Member since:
    Feb 2016

    Posted 12 Oct Link to this post

     Hi,

    I read in this, http://www.telerik.com/forums/details-of-features-supporterd, thread that you fully support binding to DataViewManager. However, I can't get it to work. Can you please elaborate on how it's possible to bind the grid to DataViewManager to be able to display the hierarchy of the tables in the underlying dataset.

    The background/purpose of my question is this: I have a DataSet returned from our service that contains multiple tables with a parent-child relation, specified with a DataRelation in the DataSet. These tables are fully dynamic which makes it hard to create a proper ViewModel of it. Hence, I want to display the data with its relation directly in the grid.

    This works well when binding the grid directly to the DataSet. The hierarchy is correctly displayed in the grid. However, my next demand is that it should support update notification of the underlying data so that the grid automatically refreshes when a value in a DataTable changes. That's why I figured I should bind to the DataViewManager of the DataSet instead, but that doesn't work. Binding to the parent table's DataView works, but then the hierarchy is lost (and I get a DataRelation column too).

    /Staffan

  2. Yoan
    Admin
    Yoan avatar
    1069 posts

    Posted 17 Oct Link to this post

    Hello Staffan,

    I am sending  you a sample project which demonstrates how to use DataViewManager and our RadGridView. Please note that if the DataViewManager contains two or more tables, you must specify the table to bind to.

    I hope this helps.

    Regards,
    Yoan
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Staffan
    Staffan avatar
    2 posts
    Member since:
    Feb 2016

    Posted 17 Oct in reply to Yoan Link to this post

     Hi,

    Your sample doesn't show any hierarchy/relation in a single grid at all, so it isn't useful.

    /Staffan

  5. Yoan
    Admin
    Yoan avatar
    1069 posts

    Posted 19 Oct Link to this post

    Hello,

    You can use GridView's RowDetails feature as demonstrated in this help article. Please check the updated version of my sample project.

    Regards,
    Yoan
    Telerik by Progress
    Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
Back to Top