안녕.
먼저 syncfusion 패키지 '20.2.0.44' 버전을 사용하고 있습니다.
필드 값이 'true'인 경우 체크된 상태로 데이터가 로드되도록 그리드에 체크박스 컬럼을 만들어 처리하였다. 그러나 checkBox 컬럼의 필드 값은 'true'로 명확하게 전달되었으나 확인되지 않았다.
<그리드 HTML 코드>
<스크립트 기능>
<컨트롤러>
'created' 함수(PiperackDataBinding)에서 DataManager를 사용하여 url을 설정하고 해당 url로 이동하여 컨트롤러에서 정상적으로 데이터를 가져오는지 확인했습니다. 빨간색 상자를 보면 ITEM_NM으로 데이터의 'CHECK1'이 '731-PR-05'는 사실입니다.
<데이터 바인딩 그리드>
그러나 데이터가 로드된 그리드는 '731-PR-05' 확인란에서 선택되지 않은 상태로 유지됩니다. 스크린샷에는 나오지 않았지만 '731-PR-01'과 '736-SH-25'는 같은 현상이다.
이 문제를 해결할 수 있는 방법을 제안해 주시면 감사하겠습니다.
Hi TaeWook Kang,
Thanks for contacting Syncfusion support.
The “checkbox” column type is used only for Grid row selection purposes. From your query, we understood that you want to show the Boolean value as a checkbox. You can achieve your requirement by using the “displayAsCheckBox” property. Please refer to the below code example and documentation link for more information.
|
<e-grid-column field="Verified" headerText="Verified" displayAsCheckBox="true" textAlign="Center"></e-grid-column>
|
Please get back to us if you need further assistance on this.
Regards,
Pavithra S
If you apply the example you sent, it will be checked normally when it is 'true', but it is impossible to uncheck.
I want to make both Checking and Unchecking possible.
This is because if you select or deselect from the grid, the boolean value is updated in my DB.
Before I made this inquiry, it worked perfectly as I wanted, but at some point it didn't work. Is there any update regarding the check box recently?
Hi TaeWook Kang,
Based on the provided details we have prepared a sample with 20.2.0.44 version and tried to reproduce your reported problem, but it was working fine at our end. The checkboxes are checked correctly based on the field value. Please refer to the below screenshot and sample for more information.
|
|
So please share the below details that will be helpful for us to validate the issue and provide a better solution.
Share the network tab screenshot for data fetching.
Share the .NET version
Is there any style customization for the checkbox?
If possible, share an issue reproducible sample, or please try to reproduce the issue with our above attached sample.
Regards,
Pavithra S