Hi, I'm looking an either client-side or server-side to either append '*' to the Folder Name or switch the icon. Right now, we're only allowing members to download the files and we keep that the download status.
Thanks
Vinh Vu
1 Answer, 1 is accepted
0
Dobromir
Telerik team
answered on 21 Mar 2012, 12:44 PM
Hi Vinh,
I already answered your support ticket on the subject. For convenience I will paste my answer here as well.
If I understand you correctly, you need to mark the newly uploaded files with a marker in the file list. RadFileExplorer does not offer such functionality out-of-the-box. Nevertheless, to achieve this I would suggest you to sub-class the FileSystemContentProvider class and override its StoreFile() and ResolveDirectory() methods.
In the StoreFile() method save information of the uploaded file(for example in a database) to mark it as latest upload.
In the ResolveDirectory() check if any of the files is marked as latest upload, and if so add a custom attribute to it (as demonstrated in this live demo).
Handle the RadFileExplorer's ClientFolderLoaded client-side event and change the icon of the grid's row, e.g.:
function OnClientFolderLoaded(oExplorer, args)
{
var dataItems = oExplorer.get_grid().get_masterTableView().get_dataItems();
for (var i = 0; i < dataItems.length; i++) {
//get reference to the data item
var item = dataItems[i];
//get the value of the "CustomAttribute"
var itemCustomAttribute = item.get_dataItem().Attributes["CustomAttribute"];
if (itemCustomAttribute == "CustomAttributeValue") {
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.