Show message if the item source is null

2 posts, 0 answers
  1. Vasanth
    Vasanth avatar
    2 posts
    Member since:
    Nov 2013

    Posted 18 Nov 2013 Link to this post

    Hi

    I have designed a tree view and i have bind the item source to the tree view. I need to show no records found message when the item source is null or count is 0.

    Can any one help me in this is issue. Please let me know ASAP. I am waiting

    Thanks :)
  2. Milena
    Admin
    Milena avatar
    204 posts

    Posted 21 Nov 2013 Link to this post

    Hello Vasanth, 

    The RadTreeView is a collection of RadTreeViewItems. If  this collection is empty, nothing would be displayed. So, if you need to display a message when the RadTreeViewItems collection is empty, you can write a custom logic for this. For example you may use a TextBlock. You should bind its Text property to the ItemSource of the RadTreeView through a Convertor. So when the ItemSource is null or empty, the converter can return a string: "No records found" otherwise the Text of the Textblock should be empty.

    I hope this information helps.

    Regards,
    Milena
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top