BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi Jeong,
Thanks for using Syncfusion products.
Query 1: I want to put the numbering and checkboxes on the grid
We suggest you to use template columns with rowDataBound client side event to put the numbering and checkboxes on the Grid. We can set numbering to the template column in the rowDataBound event based on its row index . Please refer the below code snippet for further details.
<script type="text/javascript"> $(function () { $("#Grid").ejGrid({ --------- --------- rowDataBound: "onRowDataBound", columns: [ { headerText: "Numbers", templateID: "#number" , template: true, textAlign: ej.TextAlign.Center, width: 100 }, { headerText: "Check", templateID: "#check" , template: true, textAlign: ej.TextAlign.Center, width: 100 }, --------- --------- ] }); });
function onRowDataBound(args) { var currentPage = args.model.pageSettings.currentPage; var pageSize = args.model.pageSettings.pageSize; var count = args.row.index() + 1; if (currentPage > 1) count = ((currentPage - 1) * pageSize) + count; args.row.find("td.e-templatecell:eq(0)").html(count.toString()); // Bind number value }
function onChange() { alert("Check box checked") } </script>
<script type="text/x-jsrender" id="number"> <!--Number Template--> </script>
<script type="text/x-jsrender" id="check"> <!--Checkbox Template--> <input type="checkbox" onchange="onChange()" /> </script> |
Query 2: do you know how an event when the checkbox checked?
We suggest you to set onchange event to the checkbox element in the template and handle it in the script side to achieve your requirement. Please refer the above code snippet for further details.
For your convenience we have created a simple sample and the same can be downloaded from the below link.
Sample Link: http://www.syncfusion.com/downloads/support/directtrac/118254/NumberingCheckbox-717702127.zip
Please get back to us if we misunderstood your requirement and please provide us more information regarding your requirement, So that we will be able to provide you the solution as soon as possible.
Please let us know if you have any concerns.
Regards,
Ajith R
everything works now. Thank you for your suport.
Greetings.