HREF within k-columns

2 posts, 0 answers
  1. Michael
    Michael avatar
    6 posts
    Member since:
    Oct 2015

    Posted 29 Feb 2016 Link to this post

    I'm still really new to the new framework and Kendo, so I need some help.

    I have a grid control on a page and I need help adding a link.

    The desired URL: /#/app/account/accountdetail/15

    Here is the code:

    <div kendo-grid
    k-allowCopy="true"
    k-columns="[{ field: 'Name', title: 'Account Name', template: '<div class=text-left>#: Name #</div>' }, { field: 'SlxmCustomerNumber', title: 'ID', width: 125, template: '<div>#: SlxmCustomerNumber #</div>' }]"
    k-data-source="vm.accountsDataSource"
    k-filterable="true"
    k-groupable="false"
    k-navigatable="true"
    k-pageable="{ 'pageSize': 10, 'refresh': false, 'pageSizes': true, 'buttonCount': 5 }"
    k-rebind="gridOptions.selectable"
    k-reorderable="true"
    k-resizable="false"
    k-selectable="'row'"
    k-sortable="true">
    </div>

     

    Any help would be appreciated.

  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2312 posts

    Posted 02 Mar 2016 Link to this post

    Hello Michael,

    You could add the link in the template and use the Kendo UI hash template syntax to access model properties. Any hash symbol, which is not part of the template should be escaped. Here is a small example of this.

    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