Method IsEmpty

4 posts, 0 answers
  1. Yamil
    Yamil avatar
    57 posts
    Member since:
    Jun 2012

    Posted 09 May 2008 Link to this post

    Hi. I have a RadTreeView and i checked if it is empty using RadTreeView.IsEmpty but noew with RadControls for ASP.NET AJAX,  this method always return true.
    I find a workaround, RadTreeView.Nodes.Count...
    Is this method deprecated ? If so, always return true...
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 12 May 2008 Link to this post

    Hi Yamil,

    Indeed there is a bug in the IsEmpty property. We have fixed it now and the fix would be part of the upcoming Service Pack release. Till then you can check the Count property of the Nodes collection.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Ron
    Ron  avatar
    16 posts
    Member since:
    Aug 2008

    Posted 12 Oct 2009 Link to this post

    Hi,

    I'm using the Q1 2009 and this method still returns true when there are nodes in the treeview.
    Was this Issue solved or am I missing something?

    if (RadTreePaperStock.IsEmpty)

    Thanks,

     

    Ron

  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 15 Oct 2009 Link to this post

    Hi Ron ,

    It should work as expected. The code for that property is straightforward:

    public bool IsEmpty
    {
        get { return Nodes.Count == 0; }
    }

    Can you tell us how to reproduce the problem?

    Best wishes,
    Veselin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top