Putting Kendo controls in Grid toolbar

2 posts, 1 answers
  1. Itai
    Itai avatar
    34 posts
    Member since:
    Feb 2016

    Posted 20 Apr 2016 Link to this post

    Hello, 

     

    I'm trying to put a Kendo Upload control in a grid (which should display uploaded files), but I can't figure out how to do it. 

    I tried something like 

     

    var $upload = $('<input type="file" id="upload">').kendoUpload();
    ('#files-grid').kendoGrid({
      // Other configuration ...
      toolbar: [{template: $upload.html()}]
    });

     

    but that doesn't seem to work. Any hint as to how to achieve this? I've seen references to `kendo.template`, but it's unclear how to use Kendo controls with it, and not just plain HTML. 

    Of course, later I'll want to further configure the upload control, but I left it blank for now. 

     

    Thank you.

  2. Answer
    Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2310 posts

    Posted 22 Apr 2016 Link to this post

    Hello Itai,

    You could add the input in the template and then initialize the Upload widget on document.ready after the Grid. Similar scenario is implemented in the following demo with DropDownList instead.

    Regards,
    Dimiter Madjarov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top