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

Grid checkbox only sets dirty when clicking certain part of column

1 Answer 401 Views
Grid
This is a migrated thread and some comments may be shown as answers.
K
Top achievements
Rank 1
K asked on 13 Nov 2012, 05:37 PM
All,

I have an issue with a Kendo grid control, where one of the columns is a checkbox.  I have the checkbox working using the inline template.
template: "<input type='checkbox' class='k-checkbox' # if (ChkbxCol) { # checked='checked' # } #>"},
The issue is when the grid renders, I can check on or off any rows in the grid, but the dirty icon will not display. The checkbox column renders more towards the right hand of the column and the only way to truly trigger a row change to make the dirty icon display is if I click on the middle of the column, which moves the checkbox more center.  Then when I check or uncheck it, I see the dirty bit icon.

Has anybody run into this issue before and if so, please provide some input as it would be greatly appreciated.  I also tried to center align the checkbox, but could not.  I may be doing something wrong, but if I can get it so that when I click the checkbox, that it sets the dirty icon instead of having to click the middle of the column which moves the checkbox more centered and then have to check it that way.

I also tried to use a Kendo row template, but somehow for the row template, when I try clicking the middle of the checkbox column, it doesn't do like the above and so the dirty bit never is set.
<script id="rowTemplate" type="text/x-kendo-tmpl">
            <tr>
                <td>#= kendo.toString(Received_Date,"MM/dd/yyyy") #</td>                   
                <td align:"center">
                    #if(ChkbxCol){#
                        <input type="checkbox" checked="checked" />
                    #}else{#
                        <input type="checkbox" />
                    #}#                    
                </td>               
            </tr>
        </script>

1 Answer, 1 is accepted

Sort by
0
Jeremy Cook
Top achievements
Rank 1
answered on 20 Dec 2012, 06:56 AM
I had the same problem and found this article, it may help.

http://sympletech.com/kendo-ui-grid-multiselect-with-checkboxes/
Tags
Grid
Asked by
K
Top achievements
Rank 1
Answers by
Jeremy Cook
Top achievements
Rank 1
Share this question
or