NullReferenceException in RadListView with CollectionViewSource

Thread is closed for posting
2 posts, 0 answers
  1. Justin
    Justin avatar
    1 posts
    Member since:
    Jan 2016

    Posted 26 Jan 2016 Link to this post


    I'm hitting a null reference exception when trying to set my ItemsSource to a CollectionViewSource. This same code works when using the built in listview but I'm getting this exception when using the RadListView. Can you please let me know if I'm trying to do something unsupported here?


    System.NullReferenceException: Object reference not set to an instance of an object.
       at Telerik.UI.Xaml.Controls.Data.RadListView.get_ShouldDisplayEmptyContent()
       at Telerik.UI.Xaml.Controls.Data.RadListView.Telerik.UI.Xaml.Controls.Data.ListView.IOrientedParentView.Measure(IGeneratedContainer container, RadSize availableSize)
       at Telerik.UI.Xaml.Controls.Data.ListView.Model.LayoutController.MeasureEmptyContent(RadSize size)
       at Telerik.UI.Xaml.Controls.Data.ListView.Model.LayoutController.Meas


            <CollectionViewSource x:Name="CvsSections"
                                  Source="{Binding Sections}"

    <data:RadListView ItemsSource="{Binding Source={StaticResource CvsSections}}"/>

  2. Tsvyatko
    Tsvyatko avatar
    863 posts

    Posted 28 Jan 2016 Link to this post

    Hi Justin,

    Thank you for contacting us! Currently, RadListView does not support CollectionViewSource as ItemsSource. We have some ideas of implementing this in future, but we do not have fixed timeframe.

    If you are looking for displaying data in groups you can feed the listview with flat IEnumerable and add group descriptors -

    Let us know if this helps.

    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
Back to Top