Hi,
I want throw in any moment the event of button in fileexplorer, and not only pressing the button
How can i do that'??
Thanks
1 Answer, 1 is accepted
0
Fiko
Telerik team
answered on 27 Aug 2009, 08:34 AM
Hi Katyusca,
This can be achieved by getting the reference to the RadToolBar and then use its client-side API. The code bellow shows the steps to run the Upload command from JavaScript. The commented parts also work and you could use the same approach for the other commands in the Explorer.
<script type="text/javascript">
function runCommand()
{
var oExplorer = $find("<%= RadFileExplorer1.ClientID %>");
var oToolbar = oExplorer.get_toolbar(); // Get the toolbar
// Upload button ;
var oUpButton = oToolbar.findItemByValue("Upload");
oUpItem.click();
// delete command ;
// var oDelButton = oToolbar.findItemByValue("Delete");
// oDelButton.click();
// Refresh command ;
// var oRefreshButton = oToolbar.findItemByValue("Refresh");
// oRefreshButton.click();
// Instead you could use the oExplorer.refresh(); as well ;