I have added a custom button to the FileExplorer toolbar as per the demo.
How can I invoke the server-side ItemCommand of the FileExplorer control when this button is clicked?
At this point nothing seems to fire when the button is clicked.
1 Answer, 1 is accepted
0
Rumen
Telerik team
answered on 18 May 2011, 01:04 PM
Hello Steve,
The ItemCommand event occurs when one of these operations are performed in RadFileExplorer:
UploadFile - fired before each uploaded file is saved
MoveDirectory - fired before a directory is moved/renamed
CreateDirectory - fired before the file explorer creates a new folder
DeleteDirectory - fired before the file explorer deletes a folder
DeleteFile - fired before a file is deleted
MoveFile - fired before a file is moved/renamed
Could you please explain in more details what your scenario is so that we can propose a solution? As you can see in the code of the following help article: Adding a custom button to the toolbar and an item to the tree context menu, the custom button has attached only a client click event, but not a server click event. You can put a hidden Asp:Button on the page and in the click client event of the custom button to programmatically click the Asp:Button, which will fire the server click event of the Asp:Button.
var btnSubmit = $get("<%=btnSubmit.ClientID%>"); //get a reference to the Asp:Button
btnSubmit.click(); //click it programmatically