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

[Urgent][Important] Datagrid checkboxcolumn doesn't show the checkbox value as checked on load

Hi Syncfusion team,

I am having issues with the datagrid check box column. I unable to load the rows with the checkbox as checked, it's invisible on the load. Below I have attached the code to load the grid and attached screen shot with the numbers in them.


<syncfusion:SfDataGrid x:Name="datagrid" AutoGenerateColumns="False" AutoGenerateRelations="True" ItemsSource="{Binding Rules}">
                    <syncfusion:SfDataGrid.Columns>
                        <syncfusion:GridTextColumn MappingName="Name" />
                        <syncfusion:GridTextColumn MappingName="RuleType" />
                        <syncfusion:GridCheckBoxColumn HeaderText="Activate" MappingName="Activate" AllowEditing="True"/>
</syncfusion:SfDataGrid.Columns>
</syncfusion:SfDataGrid>

  1. First I am able to load the grid with the rows inside it and by default all the checkboxes are false/unchecked boxes are shown on the grid(1 image for reference).
  2. After checking a row true the data is updated in the backend and then the checkbox is checked in the display also it's little grey.
  3. I move away from the page and then go back to the page which loads all the data and now the checkbox will be set to true i.e, checked in the UI but after loading data the checkbox is invisible(3rd image for reference).
Solution here I am looking at is how to show the checked box in the grid when grid loads.

Regards,
Arjun

Attachment: Projectinformation_page_grid_issue_d3cc2fce.zip

1 Reply

MA Mohanram Anbukkarasu Syncfusion Team October 25, 2019 01:26 PM UTC

Hi Arjun,   
  
Thanks for contacting Syncfusion support.   
  
Query   
Solution   
First I am able to load the grid with the rows inside it and by default all the checkboxes are false/unchecked boxes are shown on the grid(1 image for reference).   
The checked state of the checkboxes will be decided based on the underlying value of that specific column. As per your code snippet, if the value of the Activate field in the underlying record is true, then the checkbox will be in checked state.   
After checking a row true the data is updated in the backend and then the checkbox is checked in the display also it's little grey.   
By default, the checkboxes will not be like this as you shown in the screenshot. It will be as given in the following image.   
  
     
  
Please let us know if you have any style customizations or applied any visual styles for the grid in your application.    
I move away from the page and then go back to the page which loads all the data and now the checkbox will be set to true i.e, checked in the UI but after loading data the checkbox is invisible(3rd image for reference).   
We are unclear about the issue replication. Please provide more detailed information to replicate this issue. If possible, provide us sample to replicate this issue in our end. It will be helpful for us to find the exact cause for the issue and to provide a proper solution at earlier.   
  
  
Regards,   
Mohanram A  


Loader.
Up arrow icon