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

Putting Kendo controls in Grid toolbar

1 Answer 189 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Itai
Top achievements
Rank 1
Itai asked on 21 Apr 2016, 02:36 AM

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.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 22 Apr 2016, 11:26 AM

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!
 
Tags
Grid
Asked by
Itai
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or