Missing Property causes Filtering and Sorting to no longer work

3 posts, 0 answers
  1. Peter
    Peter avatar
    5 posts
    Member since:
    Jun 2014

    Posted 30 Dec 2015 Link to this post

    I'm using RadGridView to show certain properties of a list of elements.
    This works as expected as long as all elements in the list have all properties the columns bind to.

    But once only one element does not have a property a column binds to the whole columns fails to correctly support sorting and filtering.

    When sorting no element is shown at all and the filter dialog does not show any values. See attached screenshots.

    This still happens even though a FallbackValue of the right type is provided in the Binding.


    Is there a way to make this work? Sadly I can not avoid having some elements that do not implement all properties, so a failing binding most be handled in a better way. 


    My Xaml:

    <Window x:Class="WpfTestApplication.MainWindow"
            Title="MainWindow" Height="200" Width="300">
            <telerikG:RadGridView ItemsSource="{Binding Elements}" AutoGenerateColumns="False">
                    <telerikG:GridViewDataColumn Header="cost" DataMemberBinding="{Binding cost, FallbackValue=0.0}"/>
  2. Stefan Nenchev
    Stefan Nenchev avatar
    239 posts

    Posted 04 Jan Link to this post

    Hello Peter,

    I have tried reproducing the issue you have described but was not able to. I have recorded the behavior and you can review it at http://screencast.com/t/l26cmAGhI. Can you please provide some more information regarding the setup at your end and more specifically the data source for the grid? 

    I have also created a sample project for you. Would it be possible to modify it so that it represents the undesired behavior and send it over so I can have a more detailed look and hopefully find the root of the issue? 

    I am looking forward to your reply, Peter.

    Stefan Nenchev
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
  4. Peter
    Peter avatar
    5 posts
    Member since:
    Jun 2014

    Posted 04 Jan Link to this post

    Hello Stefan,

    I was able to modify your example.
    You just set a property to null. But my Problem is triggered when a object is off a different type has does not have a certain property at all.

    The problem is probably also related to the fact that our models use the ICustomTypeDescriptor interface to expose properties at runtime.


    Peter Grüner

Back to Top