Firing ItemCommand event from custom button

2 posts, 0 answers
  1. steve matheson
    steve matheson avatar
    28 posts
    Member since:
    Jul 2005

    Posted 13 May 2011 Link to this post

     

    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.

  2. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 18 May 2011 Link to this post

    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top