We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

ejTreeGrid Boolean Field Error


As shown in the examples boolean field grid in view It appears in the form of Check Box, same data want  to shown  with Tree Grid  true/false as string view.

What we need to do to view checkbox?



Attachment: ExampleCodeBooleanField_f6dfa940.zip

1 Reply

JS Jonesherine Stephen Syncfusion Team August 3, 2016 09:08 AM UTC

Hi Irfan, 
Thanks for contacting Syncfusion support. 
By using the column template in TreeGrid we can render the checkbox in columns. To edit the checkbox we need to use the “editType” as “booleanedit”.  
Please find the code snippet below: 
<script type="text/x-jsrender" id="customColumnTemplate"> 
        <div style='padding-left:5px;'>{{if approved}}<input type="checkbox" checked disabled>{{else}}<input type="checkbox" disabled />{{/if}}</div> 
$(function () { 
                      columns: [ 
         { field: "approved", headerText: "Approved", editType: "booleanedit", isTemplateColumn: true, templateID: "customColumnTemplate" } 
We have also modified the sample for your reference. Please find the sample from below location: 
Please let us know if you need more information on this.
Jone sherine P S

Live Chat Icon For mobile
Up arrow icon