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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

148551 Oct 24,2019 01:17 PM UTC Oct 25,2019 01:26 PM UTC WPF 1
loading
Tags: SfDataGrid
Arjun Singh
Asked On October 24, 2019 01:17 PM UTC

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

Mohanram Anbukkarasu [Syncfusion]
Replied On 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  


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.

Please sign in to access our forum

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon