3

I have a table and I wanted to add a column for a button that goes to a different page. Ideally, after column 0, it would be great that the following column 1 would have a button that calls a function that will take the user to a different page.

I am having a hard time doing the column with the template.

    <div kendo-grid
         k-sortable="true"
         k-resizable="true"
         k-pagable="true"
         k-filterable="true"
         k-data-source="model.dataSource"
         k-columns='[
            {"field": "blog", "width": "120px"},
            {"template": "<button class="k-button" ng-click="goToSite(site)"},
            {"field": "day", "width": "120px"},
            {"field": "value","width": "120px"},
            {"field": "userColor","width": "120px"}
            ]'></div>

I know there is something wrong with the template syntax, but how do I fix it??

The Kendo Dojo link is here: http://dojo.telerik.com/Ipar/6

1 Answer 1

3

It's far today but if I modify a little bit your code on button line, it rocks :)

{"template": "<button class=\"k-button\" ng-click=\"goToSite(site)\">Go </button>"}

http://dojo.telerik.com/Ipar/33

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.