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
8 Answers, 1 is accepted
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}" ....
Vlad
the Telerik team
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
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.
Maya
the Telerik team
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
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.
Maya
the Telerik team
thanks for your reply!
I'll wait for the fix ;)
Andrea
have you some news for this issue ?
Thanks
Andre
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.
Maya
the Telerik team