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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

displaying Boolean as yes or no

Thread ID:





103255 Apr 17,2012 10:33 AM UTC May 20,2016 07:26 AM UTC ASP.NET Web Forms (Classic) 5
Tags: GridGroupingControl
Asked On April 17, 2012 10:33 AM UTC

I am using essential grid for MVC3.I am binding a datasource that has boolean as one property.The essential grid displays the Boolean property as checkbox.I need to display it as 'true' or 'false' like that...Could you help me with this?

Bala Murugan A.S [Syncfusion]
Replied On April 18, 2012 10:57 AM UTC

Hi Satheeshkumar,

Thanks for using Syncfusion Products.

We suggest you to use Format() method for the columns to display Boolean values(true or false) instead of check box. Please refer the below code snippet.

.Column(column => {
column.Add(P => P.Discontinued).HeaderText("Discontinued").Format("{0}");

For your convenience, we have prepared a simple sample to demonstrate this and the same can be downloaded from the below link.

Sample link: http://www.syncfusion.com/downloads/Support/DirectTrac/92329/Sample222748475.zip

Please try the above sample and let us know if you have any concerns.

Bala Murugan A.S

Replied On April 26, 2012 12:19 PM UTC

Hi Balamurugan,
Thanks for your timely reply.I tried your answer,but unfortunately it displays as 0 or 1 not yes/no.

Thank you in advance.

Bala Murugan A.S [Syncfusion]
Replied On May 7, 2012 05:50 AM UTC

Hi Satheesh Kumar,

Thanks for the update.

We are sorry for the delay in getting back to you. We are not able to reproduce your reported issue in our end. We have prepared a video of working sample and the same can be downloaded from the below link. Please have a look at the video.



Please let us know if you have any concerns.


Bala Murugan A.S

Nguyen Quy Danh
Replied On May 19, 2016 07:33 AM UTC

How can I display a Boolean property as checkbox?
I have a data source with boolean value and i want to ddissplay as a checkbox.

Kavitha Narayanan [Syncfusion]
Replied On May 20, 2016 07:26 AM UTC

Hi Nguyen, 
Query: I have a data source with Boolean value and I want to display as a checkbox. 
By default, Grid displays the Boolean property as checkbox. So, here it is not required to set Format () method for the column  
Please refer to the code and screenshot. 
.Column(column => 
                             column.Add(p => p.ProductID).HeaderText("Order ID").Width(90).TextAlign(TextAlignment.Right); 
                             column.Add(p => p.ProductName).Width(100); 
                             column.Add(p => p.Discontinued).Width(90);//set boolean property to this column.                          
For your convenience, we have prepared a sample. 
We hope it helps to resolve your issue. 
Kavitha N. 


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon