ImageBrowser / FileBrowser - How do I override the select event?

2 posts, 0 answers
  1. Aaron
    Aaron avatar
    18 posts
    Member since:
    Nov 2012

    Posted 15 Sep 2014 Link to this post

    I want to implement an Outlook / email style control when attaching files.  I need to override the Filebrowser event to NOT insert a link to the document, I just need to know the ID of the document so I can store it separately.  Is there any way to do this?  I don't see any events for File / image browsers.

    Thanks.
  2. Dimo
    Admin
    Dimo avatar
    8332 posts

    Posted 17 Sep 2014 Link to this post

    Hello Aaron,

    The desired result requires three steps:

    1. Obtain a reference to the ImageBrowser or FileBrowser widget after it is opened. The following forum post shows how to do that.

    http://www.telerik.com/forums/readonly-folders-for-file-and-image-browser#BHo2ATM2gk2liWGFDXfRTg

    (use .k-insertFile for the FileBrowser toolbar icon)


    2. Disable the native ImageBrowser or FileBrowser functionality:

    var element = $(".k-imagebrowser"); // or .k-filebrowser
      
    element.data("kendoImageBrowser").unbind("apply"); // or kendoFileBrowser
    element.closest(".k-window").find(".k-dialog-insert").off("click");


    3. Attach new apply and click handlers that do whatever you need. The following documentation section shows how to attach widget event handlers after initialization via bind.

    http://docs.telerik.com/kendo-ui/basics/events-and-methods#bind-to-the-widget-events

    More information about the FileBrowser and ImageBrowser is available here:

    http://www.telerik.com/forums/file-manager-2caeaccf98d2

    Regards,
    Dimo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top