4 Answers, 1 is accepted
0
Bruno Larose
Top achievements
Rank 2
answered on 09 Aug 2012, 06:28 PM
Please can you send a sample project?
thanks
thanks
0
Hugo
Top achievements
Rank 1
answered on 20 Aug 2012, 07:30 PM
Yes sure so here it's my view (my project is in VS with MVC).
Here my javascript related to the kendo.
Here I added a screenshot what look like the grid.
So my goal is when the user click the checkbox in a row to catch this event, know the row selected.
Thank you
<div id='containerGrid' class='grid_12'> <div class='grid_3'> </div> <div id='gridKendo' class='grid_8'> </div> </div>
<script id="rowTemplate" type="text/x-kendo-tmpl"> <tr> <td> <a href="/User/UserDetails?Username=${Username}">${Username}</a> </td> <td> ${ Email } </td> <td> #if(ActiveUser){# <input type="checkbox" checked="checked" /> #}else{# <input type="checkbox" /> #}# </td> </tr> </script>
Here my javascript related to the kendo.
$("#gridKendo").kendoGrid({ dataSource: { data: data, pageSize: 10 }, groupable: false, sortable: false, selectable: "row", filterable: true, sortable: true, resizable: true, reorderable: true, pageable: { refresh: false, pageSizes: true }, rowTemplate: kendo.template($("#rowTemplate").html()) });
Here I added a screenshot what look like the grid.
So my goal is when the user click the checkbox in a row to catch this event, know the row selected.
Thank you
0
Accepted
Shane
Top achievements
Rank 1
answered on 27 Aug 2012, 05:27 PM
Add an onclick to the input type and then find the parent TR element using Javascript.
#if(ActiveUser){# <input type="checkbox" checked="checked" onclick="DoSomething(this);" /> #}else{# <input type="checkbox" onclick="DoSomething(this);"
/> #}#
0
Hugo
Top achievements
Rank 1
answered on 28 Aug 2012, 07:09 PM
Thank you