Master / Detail with RadGridView

9 posts, 1 answers
  1. Andrea Rapuzzi
    Andrea Rapuzzi avatar
    28 posts
    Member since:
    Apr 2010

    Posted 01 Feb 2011 Link to this post

    Hi,

    I would like to achieve a master detail scenario where the user select a row in a RadTreeListView and the details will be shown in a RadGridView using binding.

    My RadTreeListView is binded to an observable collection, I also tried with a QueryableCollectionView but I wasn't able to bind the RadGridView with the RadTreeListView selected item.

    The source for the details is an observable collection that is a property of the source for the RadTreeListView.

    I'm using Prism and I would like to follow the MVVM pattern if possible.

    Thanks !!

    Andrea
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 02 Feb 2011 Link to this post

    Hi,

     If your details data are property of the data item in the collection bound to the treelistview you can simply set:

    <telerik:RadGridView ItemsSource="{Binding SelectedItem.MyChildData, ElementName=RadTreeListView1}" ....

    Best wishes,
    Vlad
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. Andrea Rapuzzi
    Andrea Rapuzzi avatar
    28 posts
    Member since:
    Apr 2010

    Posted 02 Feb 2011 Link to this post

    Perfect,

    it works fine !

    Thanks Vlad

    But now I have another problem ...

    In my RadTreeListView I have a column with a cell template, the column is a GridViewDataColumn and it's binded to a bool property in my ObservableCollection. The cell template use a converter in the binding that if the value is true return an ImageSource. At this point it's all ok, I can filter and sort by that column. The problem occours when I filter with the builtin filter button on the header, because the filter window shows only the false value in the list. Then when I click on the checkbox the filter action occours has expected, but when i click again to uncheck, without exiting the filter window, the RadTreeListVieew does nothing. At this point if I close the filter window I see the filter applied and if I click again on the filter button the RadTreeListView refresh its content and open the filter window with the false checkbox unchecked.

    Thanks

    Andrea
  5. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 03 Feb 2011 Link to this post

    Hello Andrea Rapuzzi,

    I have tried to reproduce the issue you specified, but I was not able to. I am sending you the sample project I used for testing the scenario. Please take a look at it and let me know in case of any misunderstandings.
     

    Greetings,
    Maya
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  6. Andrea Rapuzzi
    Andrea Rapuzzi avatar
    28 posts
    Member since:
    Apr 2010

    Posted 03 Feb 2011 Link to this post

    Hello Maya,

    thanks for your sample, but it has the same issue I've explained before ...

    I've found a couple of issue, I'll give you the step to reproduce them with your example

    1. 1. Open the Nationality filter window
    1. 2. Click on the Images/spain.jpg checkbox (the radtreelistview filter as expected)
    1. 3. Click again on the same checkbox (the radtreelistview does nothing, the Select All checkbox still have the minus sign)
    1. 4. Click on the Filter and / or Clear Filter button (the radtreelistview does nothing)
    1. 5. Close the filter window
    1. 6. Reopen the Nationality filter window (the radtreelistview now reset the data and the filter)

    2. 1. Repeat step from 1. 1. to 1. 5.
    2. 2. Open the Country filter window
    2. 3. Click on Select All
    2. 4. Uncheck England
    2. 5. Uncheck Spain
    2. 6. Close the filter window
    2. 7. Open the Country filter window again : Crash ! unhadled exception

    Thanks for your help !

    Andrea
  7. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 08 Feb 2011 Link to this post

    Hello Andrea Rapuzzi,

    Indeed, you are quite correct and we managed to reproduce the issue. However, we will need a bit more time for investigating the cause of it and providing a solution. I will get back to you as soon as a fix for it is available.
    Thank you for you patience and cooperation.
     

    All the best,
    Maya
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  8. Andrea Rapuzzi
    Andrea Rapuzzi avatar
    28 posts
    Member since:
    Apr 2010

    Posted 08 Feb 2011 Link to this post

    Hello Maya,

    thanks for your reply!

    I'll wait for the fix ;)

    Andrea
  9. Andrea Rapuzzi
    Andrea Rapuzzi avatar
    28 posts
    Member since:
    Apr 2010

    Posted 21 Feb 2011 Link to this post

    Hello Maya,

    have you some news for this issue ?

    Thanks

    Andre
  10. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 25 Feb 2011 Link to this post

    Hi Andrea Rapuzzi,

    Firstly, please excuse me for the late replied. 
    The issue has already been resolved and the fix is available both in our Latest Internal Build and in our Q1 2011 Beta release. I am sending you a sample project using the binaries from our internal build so that you can immediately test it.
     

    Regards,
    Maya
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top
DevCraft banner