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.
Unfortunately, activation email could not send to your email. Please try again.

Boolean / Checkbox Column

Thread ID:

Created:

Updated:

Platform:

Replies:

129434 Mar 17,2017 08:00 AM Mar 20,2017 08:56 AM JavaScript 1
loading
Tags: ejGrid
Matt Abercrombie
Asked On March 17, 2017 08:00 AM

How do you get the checkboxes that display in a boolean column to appear with the ejCheckBox styling instead of the regular html / browser style?

Venkatesh Ayothi Raman [Syncfusion]
Replied On March 20, 2017 08:56 AM

Hi Matt, 
Thanks for contacting Syncfusion support. 
We have achieved your requirement using queryCellInfo event in Grid. In this event get every time a request is made to access cell information, element and data. In that event, we have changed the normal checkbox to ejCheckbox control. Please refer to the following code example, Help documentation and sample, 
Code example
@Grid 
$("#Grid").ejGrid({ 
                // the datasource "window.gridData" is referred from jsondata.min.js 
                dataSource: window.gridData, 
                 . . . 
                queryCellInfo: function (args) { 
                    if (args.column.field == "Verified" && !$(args.cell).find("input").hasClass("e-checkbox")) { 
                        $(args.cell).find("input").ejCheckBox();//render the ejCheckbox                        
                    } 
                }, 
                . . . 
                columns: [ 
                         . . . 
                   {field:"Verified", headerText:"boolean column", editType:"booleanedit", width:90} 
                ] 
            }); 
 
@Style 
<style> 
 
      .e-chkbox-small > span { 
            margin-left: 10px; 
        } 
    </style> 

Regards, 
Venkatesh Ayothiraman. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;