How can I transfer the url of the document I click on the AddressBox?
So when I click on a documented as shown in the AddressBox complete URL as www.mydomain.se/documents/mydocument.pdf
So when I click on a documented as shown in the AddressBox complete URL as www.mydomain.se/documents/mydocument.pdf
3 Answers, 1 is accepted
0
Hi Kjell,
You can attach a handler to the FileExplorer's ClientItemSelected event where the path to the selected path can be taken in a similar way:
Regards,
Vessy
Telerik
You can attach a handler to the FileExplorer's ClientItemSelected event where the path to the selected path can be taken in a similar way:
<
telerik:RadFileExplorer
ID
=
"RadFileExplorer1"
runat
=
"server"
OnClientItemSelected
=
"onClientItemSelected"
>
<
Configuration
ViewPaths
=
"~/Images"
DeletePaths
=
"~/Images"
UploadPaths
=
"~/Images"
/>
</
telerik:RadFileExplorer
>
<
script
>
function onClientItemSelected(fileExplorer, args) {
var siteUrl = document.location.origin,
itemPath,
path
if (!args.get_item().isDirectory()) {
itemPath = args.get_path();
}
path = siteUrl + "/" + itemPath;
//open the selected image into a new window
//window.open(path);
}
</
script
>
Regards,
Vessy
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
0
Hello Kjell,
Thank you for the additional information - it seems that I have misunderstood the scenario you want to achieve.
In order to display the site URL in the FileExplorer's AddressBox you will need to implement a custom content provider and pass the desired URL mask to a mapping file. A live implementation of a similar approach is provided here: Use RadFileExplorer with physical and shared folder's paths
Regards,
Vessy
Telerik
Thank you for the additional information - it seems that I have misunderstood the scenario you want to achieve.
In order to display the site URL in the FileExplorer's AddressBox you will need to implement a custom content provider and pass the desired URL mask to a mapping file. A live implementation of a similar approach is provided here: Use RadFileExplorer with physical and shared folder's paths
Regards,
Vessy
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.