Home Forums WPF controls Xceed DataGrid for WPF How to bind values(Collection) to Master/Detail grid?

Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064

    Chris,

     you should set the items source as a DataGridCollecionView then detail grids should work

     

    var items = from x in datasource…

    var view = new DataGridCollectionView(items)

    grid.ItemsSource = view;

     

     

    Imported from legacy forums. Posted by MiddleTommy (had 896 views)

    User (Old forums)
    Member
    Post count: 23064

    Many thanks to Koch for this sample – Xceed – can you please put this in the documentation/samples or raise it’s profile – i’ve spent ages trying to find out how to make this work. This sample is an excellent start and restored my confidence in the grid! – I certainly didn’t want to have to dynamically create DataTables 🙂

    Imported from legacy forums. Posted by richard (had 2968 views)

    User (Old forums)
    Member
    Post count: 23064

    I agree. Koch’s sample is very helpful. I’ve few more requirements. 1. Change the column titles, 2. In Child grid column I want to populate data into combo box (in example below, “Suggested Room” column). 3. Show some custom data instead of Group Header Name (in example below, “2 conflicts out of 24 occurrences“).

    How do I achieve this?

    Also, I could not programmatically set AutoCreateItemProperties to false for DataGridCollectionView object. Any work around for this?

    Any help will be much appreciated!

    Example:

    Building 1

          |

          |    Select  Room Name

          |–     o       Room 1

          |                 2 conflicts out of 24 occurrences

          |                      |

          |                      |– Date of Conflict                         Suggested Room

          |                             1/1/2009                                    Room 10

          |                             2/1/2009                                    Room 20

          |–      o      Room 2

          |                 1 conflicts out of 24 occurrences

          |                      |

          |                      |– Date of Conflict                         Suggested Room

          |                             3/1/2009                                    Room 30

     

    Imported from legacy forums. Posted by ks (had 1754 views)

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