Cannot filter false condition for boolean column

A boolean column (not nullable) cannot be filter for false value only the true value is displayed eighter for Excel and CheckBox filter setting



<ejs-grid id="grid" dataSource="ViewBag.DataSource" allowFiltering="true" >

    <e-grid-filtersettings type="CheckBox"></e-grid-filtersettings>
    <e-grid-pagesettings pageCount="5"></e-grid-pagesettings>

    

    <e-grid-columns>
        <e-grid-column field="Id" headerText="Budget Id" textAlign="Right"></e-grid-column>
        <e-grid-column field="Title" headerText="Title"></e-grid-column>
        <e-grid-column field="AmountSw" headerText="Amount Sw" format="C2"></e-grid-column>
        <e-grid-column field="IsClosed" headerText="IsClosed" displayAsCheckBox="true" type="boolean"></e-grid-column>

        <e-grid-column field="Year" headerText="Year"></e-grid-column>
        <e-grid-column field="Month"></e-grid-column>
    </e-grid-columns>

</ejs-grid>




1 Reply

IR Isuriya Rajan Syncfusion Team March 20, 2018 02:17 PM UTC

Hi Massimo, 

Thanks for contacting Syncfusion support. 

While serializing the Boolean values false was not include .This is default value handling behavior of JSON.Net serialization . 


For this we suggest to use this below solution in your application: 

 
[JsonProperty(DefaultValueHandling = Newtonsoft.Json.DefaultValueHandling.Include)] 
           public bool Verified { get; set; } 


Here we have created the sample with this above mentioned solution: 


Regards, 
Isuriya R 


Loader.
Up arrow icon