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

[Solved] Typescript Toolbar Error

1 Answer 121 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 09 Jan 2015, 07:16 PM
I'm trying to add a toolbar template to my grid. If I add the toolbar in a normal js file it works fine but when trying to add this in typescript file it throws an error. It says the type is incompatible. I'm very new to typescript and not sure how to fix it.

grid = $("#grid").kendoGrid({
    dataSource: {
        data: data,
        pageSize: 10
    },
    toolbar: Handlebars.compile($('#gridSearch').html()),
    columns: [ ...

1 Answer, 1 is accepted

Sort by
0
Matthew
Top achievements
Rank 1
answered on 09 Jan 2015, 08:06 PM
I found a solution 

grid = $("#grid").kendoGrid({
    dataSource: {
        data: data,
        pageSize: 10
    },
    toolbar: [{
        template: Handlebars.compile($('#gridSearch').html())({}),
    }],
    columns: [
Tags
Grid
Asked by
Matthew
Top achievements
Rank 1
Answers by
Matthew
Top achievements
Rank 1
Share this question
or