The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
In the grid control, the user can enter data in the grid or select to populate data for edit. Some columns can't be edited when data is pre-populated as they are read only. I set this by setting the readonly property to true.
When I try to clear the cells, It will not clear the readonly columns even though I set the readonly property to false.
Also, I am trying to set the background color of the readonly cells and unable to do it.
Can someone tell me what I may be missing. It's not a bound grid. I populate the values programmatically. Thanks in advance.
ADAdministrator Syncfusion Team January 9, 2007 06:03 PM UTC
Try setting
grid.IgnoreReadOnly = true;
before you try to programatically change any style properties for cells that are readonly.
ADAdministrator Syncfusion Team January 9, 2007 06:12 PM UTC
Thank you very much. That was the property I needed to set.
>In the grid control, the user can enter data in the grid or select to populate data for edit. Some columns can't be edited when data is pre-populated as they are read only. I set this by setting the readonly property to true.
When I try to clear the cells, It will not clear the readonly columns even though I set the readonly property to false.
Also, I am trying to set the background color of the readonly cells and unable to do it.
Can someone tell me what I may be missing. It's not a bound grid. I populate the values programmatically. Thanks in advance.
ADAdministrator Syncfusion Team January 9, 2007 08:14 PM UTC
>>When I try to clear the cells, It will not clear the readonly columns even though I set the readonly property to false.
>>Also, I am trying to set the background color of the readonly cells and unable to do it.
To do either of these tasks on a ReadOnly cell, you still need to set grid.IgnoreReadOnly = true;
Here is a little sample illustrating the effect of IgnoreReadOnly on setting BackColor and calling ClearCells.