Hello guys,
@Martin, thanks for sharing your solution.
Can you tell me what other reports related to this you found or at least point me where you found them, so I can try searching on myself? I mean in the forum, or here in the feedback portal, or somewhere else? I am asking this, so I can go through the other posts and see if I can address them in a meaningful manner.
About the issue at hand, in general the RadTreeListView was designed to work with the same data type on all levels, which leads to limitations here and there. That includes the scenario with class inheritance. This design decision was taken to make the control easier to maintain, more performant and less prompt to errors. For this specific scenario, we actually logged it recently in a separate item, which is why this was marked as duplicated. You can follow the other item for updates and an alternative workaround.
@Benjamin, it is sad to hear that you are not satisfied with the development of this case and the missing solution. In any case, we appreciate the feedback and it is good that you found a proper solution, thanks to Martin. In case you come up with extra feedback, don't hesitate to share it.
Regards,
Martin Ivanov
Progress Telerik
Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!
@Martin : Thank you so much for doing the job you are not paid for...
Workaround: register to DataLoaded event in your RadTreeListView and inside the codebehind method do something like this:
((QueryableCollectionView)((RadTreeListView).Items.SourceCollection)).ItemType = typeof(yourbasetype - probably generic type of you bound collection)
(yes its ugly, you can make it nicer and generic and into a behaviour, but im not paid for writing this)
Formating does not work because if the "top" collection contains only one type, then column thinks (well its more complicated, but it douesnt matter) its only for this type and fails to return formated string for second level which has different type - it returns value but does not aply the stringformat.
By settings the type, the column will be happy that the dataitem is of type derived from collectionview item type and will return value with sting applied.
At least this works for me and my problem.
PS: Taging this as feature request is just plain wrong, beacuse its obvious bug.