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
close icon

Error adding rows

Hello,

If you add rows (initially the grid does not have rows) in client side by javascript, the boolean columns don't shows the checkbox. 

Thanks.

1 Reply

MP Manivannan Padmanaban Syncfusion Team November 6, 2019 10:01 AM UTC

Hi Pedro,  

Greetings from Syncfusion Support. 

The reported issue will occur, because the column type is not updated properly. By default the grid column type is updated from the first record value and based on the type the Boolean values are displayed as checkbox. But in your case, you have added the new records to the emptied grid so the column type is not updated. Hence, the Boolean value is displayed as “true” Or “false” instead of checkbox. 

To avoid the reported issue, we suggest you to define column type in the grid column definition. Refer the below code example, 

@(Html.EJ().Grid<object>("Grid") 
                ……………. 
                            .Columns(col => 
                            { 
                                 
                                col.Field("Verified").Type("boolean").Width(50).Add(); 
                                …. 
                            }) 
) 


Kindly get back to us, if you need further assistance. We will be happy to assist you. 
  
Regards, 
Manivannan Padmanaban. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon