Empty FileExplorer

4 posts, 0 answers
  1. iomega 55
    iomega 55 avatar
    64 posts
    Member since:
    Dec 2004

    Posted 30 Nov 2009 Link to this post

    How can I detect if the FileExplorer is empty?

  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 30 Nov 2009 Link to this post

    Hello Iomega,

    You can use this check in order to determine whether the RadFileExplorer control has items :
    if (RadFileExplorer1.TreeView.IsEmpty &&
        (RadFileExplorer1.Grid.Items.Count == 0)
       )
    {
        //"RadFileExplorer1 is empty";
    }

    I hope this helps.

    All the best,
    Fiko
    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.
  3. iomega 55
    iomega 55 avatar
    64 posts
    Member since:
    Dec 2004

    Posted 30 Nov 2009 Link to this post

    Thanks for reply.

    In which event Can i Check this?  I want to check this in the next situations:

    1) after page load
    2) after delete a file

    If you have a custom filtered(public class CustomProvider : FileSystemContentProvider), and in the directory exits 10 files, but just 1 file is inside your filter, and you delete that 1 file, if you checkRadFileExplorer1.Grid.Items.Count  its value is 9 instead of 0. So it returns your directory isn't empty.





  4. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 02 Dec 2009 Link to this post

    Hi Iomega,

    The best event where you can check the items in the grid (you can use the same event for the TreeView as well) is the ExplorerPolulated one. For your convenience I have attached a demo that shows the described approach.

    I hope this helps. 

    Sincerely yours,
    Fiko
    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