RadDataBoundListBox and DataTemplate

Thread is closed for posting
2 posts, 0 answers
  1. Peter
    Peter avatar
    1 posts
    Member since:
    Jul 2014

    Posted 02 Jul 2014 Link to this post


    how is it possible, that I can hide empty rows from my listbox? Now I use a RadDataBoundListBox with a Data Template.

    Thanks in advanced for your help.

  2. Rosy Topchiyska
    Rosy Topchiyska avatar
    586 posts

    Posted 07 Jul 2014 Link to this post

    Hello Peter,

    Thank you for contacting us.

    There are three scenarios with empty items:
    • The property specified by DisplayMemberPath is null: in this case the null items will not be visualized by default.
    • The ItemsSource contains null elements and DisplayMemberPath is not specified: the same as the previous scenario.
    • The ItemsSource collection contains null elements and DisplayMemberPath is specified: in this case you will have to edit the template of the items in order to avoid NullReferenceException when the DisplayMemberPath property is not found.

    Support for empty items without editing the ItemTemplate seems useful and I have logged it in our ideas & feedback portal where our community can vote for it an raise its priority.

    I hope this helps. Please, let us know if you have further questions.

    Rosy Topchiyska

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top