This is a migrated thread and some comments may be shown as answers.

RadDataBoundListBox and DataTemplate

1 Answer 37 Views
DataBoundListBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Peter
Top achievements
Rank 1
Peter asked on 02 Jul 2014, 12:31 PM
Hi,

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.

Peter

1 Answer, 1 is accepted

Sort by
0
Rosy Topchiyska
Telerik team
answered on 07 Jul 2014, 11:10 AM

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.


Regards,
Rosy Topchiyska
Telerik
 

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.

 
Tags
DataBoundListBox
Asked by
Peter
Top achievements
Rank 1
Answers by
Rosy Topchiyska
Telerik team
Share this question
or