- Home
- Forum
- ASP.NET MVC
- How to check checkbox on dialog template based upon a grid value
How to check checkbox on dialog template based upon a grid value
Hi Fabrizio,
Thanks for contacting Syncfusion support.
To display the checkbox while editing, please render the template as follows,
|
<script type="text/template" id="editTemplate"> <table cellspacing="10"> <tr> <td style="text-align:right;">Name:</td> <td style="text-align:left;"> <input id="Name" name="Name" value="{{: Name}}" class="e-field e-ejinputtext valid" style="width:200px;" /> </td> <td> {{if Active}} <input id="Active" name="Active" type="checkbox" class="e-field e-ejcheckbox valid" checked="checkbox" style="width:20px;" /> {{else}} <input id="Active" name="Active" type="checkbox" class="e-field e-ejcheckbox valid" style="width:20px;" /> {{/if}} </td> <td style="text-align:left;">Active</td> </tr> </table> </script>
|
Please refer to the following sample,
MvcEJGrid
Regards,
Balaji Marimuthu
- 3 Replies
- 4 Participants
-
FB Fabrizio Borgione
- Sep 30, 2015 01:03 PM UTC
- Jun 29, 2016 04:01 AM UTC