I got a problem while using radfile explorer. we are upgraded our telerik version to 2012.1.411
In client side how to get file name included in path..
Example my file is in document/private/Example/file.txt
i need to get this path. but while using get_path() it is coming as document/private/Example
i have to get if it is file document/private/Example/file.txt
or if it is directory document/private/Example
Please suggest me.
In client side how to get file name included in path..
Example my file is in document/private/Example/file.txt
i need to get this path. but while using get_path() it is coming as document/private/Example
i have to get if it is file document/private/Example/file.txt
or if it is directory document/private/Example
Please suggest me.
5 Answers, 1 is accepted
0
Hello,
Greetings,
Rumen
the Telerik team
The args.get_item().get_path() method works for me and returns the whole path with the file name and extension:
<telerik:RadFileExplorer ID=
"FE1"
runat=
"server"
OnClientItemSelected=
"OnClientItemSelected"
>
<Configuration ViewPaths=
"~/Images"
/>
</telerik:RadFileExplorer>
<script type=
"text/javascript"
>
function
OnClientItemSelected(sender, args) {
alert(
"Full Path:\n"
+ args.get_item().get_path());
}
</script>
Rumen
the Telerik team
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.
0

Baji
Top achievements
Rank 1
answered on 20 Jun 2012, 08:46 AM
Thanks for the reply.
Actually we are using server side binding for ViewPaths,UploadPaths and DeletePaths and in client side just we are defining the
Please suggest me.
Actually we are using server side binding for ViewPaths,UploadPaths and DeletePaths and in client side just we are defining the
<telerik:RadFileExplorer ID=
"FE1"
runat=
"server"
OnClientItemSelected=
"OnClientItemSelected"
>
</telerik:RadFileExplorer>
<script type=
"text/javascript"
>
function
OnClientItemSelected(sender, args) {
alert(
"Full Path:\n"
+ args.get_item().get_path());//Here i'm Getting document/NewFolder instead of document/NewFolder/file1.txt
}
</script>
Please suggest me.
0
Hi Baji,
I tested your code locally and it works correctly. This leads me to think that you might be using some custom FileBrowserContentProvider and you are not returning the full paths for the files. Could you please make sure that you are returning the full file paths?
If you still cannot resolve your issue please open a new support ticket and send us a sample project demonstrating the issue?
Greetings,
Pero
the Telerik team
I tested your code locally and it works correctly. This leads me to think that you might be using some custom FileBrowserContentProvider and you are not returning the full paths for the files. Could you please make sure that you are returning the full file paths?
If you still cannot resolve your issue please open a new support ticket and send us a sample project demonstrating the issue?
Greetings,
Pero
the Telerik team
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.
0

Baji
Top achievements
Rank 1
answered on 23 Jul 2012, 10:16 AM
Thanks for your reply.
No i get the path as i needed. i returned the full file path. It worked for me.
I have another issue.
File Explorer not getting refreshed on performing any action.
<telerik:RadFileExplorer ID="Aspx_RadFileExplorer" runat="server" EnableCreateNewFolder="true"
OnClientFileOpen="OpenDocument" OnClientItemSelected="SetSelectedDocument" OnClientFolderChange="EmptySelectedDocument"
OnClientDelete="DeleteDocument" OnClientMove="MoveDocument" Width="100%">
</telerik:RadFileExplorer>
And i used custom file provider for Rad File Explorer.
If i click on refresh button everything is coming correctly. I need to call that refresh event on each action.
Please suggest me some way.
No i get the path as i needed. i returned the full file path. It worked for me.
I have another issue.
File Explorer not getting refreshed on performing any action.
<telerik:RadFileExplorer ID="Aspx_RadFileExplorer" runat="server" EnableCreateNewFolder="true"
OnClientFileOpen="OpenDocument" OnClientItemSelected="SetSelectedDocument" OnClientFolderChange="EmptySelectedDocument"
OnClientDelete="DeleteDocument" OnClientMove="MoveDocument" Width="100%">
</telerik:RadFileExplorer>
And i used custom file provider for Rad File Explorer.
If i click on refresh button everything is coming correctly. I need to call that refresh event on each action.
Please suggest me some way.
0
Hi Baji,
We are not aware of an issue causing the described behavior and you are the first one to report it. However, to be able to provide more to the point answer on the case we will need to observe and debug it issue locally. Could you please open formal support ticket and provide sample fully runnable project reproducing the problem?
Greetings,
Dobromir
the Telerik team
We are not aware of an issue causing the described behavior and you are the first one to report it. However, to be able to provide more to the point answer on the case we will need to observe and debug it issue locally. Could you please open formal support ticket and provide sample fully runnable project reproducing the problem?
Greetings,
Dobromir
the Telerik team
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.