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

how to disable the download option if folder does not have files on click rad file explorer gridview

1 Answer 89 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
sandhya
Top achievements
Rank 1
sandhya asked on 24 Jun 2011, 05:26 AM
Hi,

How to disable the download option if folder does not have files on right click of rad file explorer gridview context menu.
Please send me the code
Thanks
sandhya.

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 28 Jun 2011, 10:23 AM
Hi Sandhya,

RadFileExplorer does not offer "download" functionality out-of-the-box, so I assume it is some sort of a custom implementation. However, in general, if you want to disable a context menu item for a folder depending of if it contains files or not, I would suggest you the to implement custom content provider and override the ResolveRootDirectoryAsTree() and provide a custom attribute to the DirecotryItem. Then, you can grid's dataitem on the client and enable / disable the context menu according to this custom attribute.

More information on how FileExplorer's content provider works is available in the following help article:
Using custom FileBrowserContentProvider

Also, I believe the following live demo will be of help solving this case:
http://demos.telerik.com/aspnet-ajax/fileexplorer/examples/applicationscenarios/customgridcolumns/defaultcs.aspx
Regards,
Dobromir
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
FileExplorer
Asked by
sandhya
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or