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

Empty FileExplorer

3 Answers 81 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
iomega 55
Top achievements
Rank 1
iomega 55 asked on 30 Nov 2009, 07:04 AM
How can I detect if the FileExplorer is empty?

3 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 30 Nov 2009, 11:54 AM
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.
0
iomega 55
Top achievements
Rank 1
answered on 30 Nov 2009, 02:41 PM
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.





0
Fiko
Telerik team
answered on 02 Dec 2009, 10:53 AM
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.
Tags
FileExplorer
Asked by
iomega 55
Top achievements
Rank 1
Answers by
Fiko
Telerik team
iomega 55
Top achievements
Rank 1
Share this question
or