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

Check box in grid declaratively

2 Answers 134 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stanley
Top achievements
Rank 1
Stanley asked on 23 Aug 2012, 06:37 PM
I have a little snippit of code to create a kendo grid declaratively:

<div id="sitesGrid" data-role="grid" style="width: 800px;"
                 data-sortable="true"
                 data-columns='[{ "field": "accountName", "title": "Account", "width": "150px" }, 
                { "field": "subAccountName", "title": "Sub Account", "width": "180px" }, 
                { "field": "siteName", "title": "Site", "width": "150px" }, 
                {"field": "checkedout",  "title": "Check Out",  "width": "80px"}]'
                data-source="AuroraSurveyTool.lovs.siteList">
            </div>

I would like to have a CheckBox button in the 'Checkedout' field.   How do I do that?  I tried using a template but could not get it configured in any way that was acceptable.

2 Answers, 1 is accepted

Sort by
0
Shane
Top achievements
Rank 1
answered on 27 Aug 2012, 05:06 PM
How is the template not working?

I've used this and it works great.

template: "<input type='checkbox' value='${ UserId }' onclick='SearchGrid.IdOnClick(this);'/>"

I'm also declaring my columns in Javascript and not in the HTML.  
0
Stanley
Top achievements
Rank 1
answered on 28 Aug 2012, 11:59 AM
WHen I put that same template code in my html, I get an error message telling me I have an unterminated string.
Tags
Grid
Asked by
Stanley
Top achievements
Rank 1
Answers by
Shane
Top achievements
Rank 1
Stanley
Top achievements
Rank 1
Share this question
or