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

Firing ItemCommand event from custom button

1 Answer 115 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
steve matheson
Top achievements
Rank 2
steve matheson asked on 13 May 2011, 11:18 PM
 

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

Sort by
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

Kind regards,
Rumen
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
FileExplorer
Asked by
steve matheson
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Share this question
or