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

See file icons with treeview explorer mode

2 Answers 67 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Raul
Top achievements
Rank 1
Raul asked on 20 Jan 2012, 11:29 AM
Hi Telerik Team,

I'm using the radfileexplorer to show the content of my sharepoint 2010 library. However it was very slow when loading all my content, so I'm trying the treeview explorer mode. Just like this.

<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" Language="es-ES" OnClientFileOpen="OnClientFileOpen" AllowPaging="true" VisibleControls="Grid,Treeview" explorermode="FileTree">
 </telerik:RadFileExplorer> 


But the problem I'm getting right now is that I can't see my files icon. Everything loads great, but to every file loads the same icon (the unknown file one), the folders load good.


So I was wondering if there's anyway to recognize my file extension and get the correct one


Thanks in advance

Best Regards

Raúl Ortega

2 Answers, 1 is accepted

Sort by
0
Raul
Top achievements
Rank 1
answered on 20 Jan 2012, 12:22 PM
I've been modifying the fileextensionsprites moving icons up and down and my files get always the same position icon, which was originally destinated to the unknown one.



Edit---

Getting a little deeper i realised that when my explore mode is TreeView this javascript code

function OnClientFileOpen(oExplorer, args) {
          //get the extension of the opened item
          var fileExt = args.get_item().get_extension();
alert(fileExt)
}

returns me nothing. But when is set to default returns me the good extension. But I still don't understand why, or how to solve it.
0
Raul
Top achievements
Rank 1
answered on 20 Jan 2012, 02:44 PM
Already resolved!!

I didn't realised that spfile extension property is automatically done by the default explorermode but not the treeview one.
Tags
FileExplorer
Asked by
Raul
Top achievements
Rank 1
Answers by
Raul
Top achievements
Rank 1
Share this question
or