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

Problems with GridCellNumericRenderer

Hi,

I've a SfDataGrid with a Itemsource with five column pairs "Value01" & "Value01ReadOnly", "Value02" & "Value02ReadOnly", ...

Each "Value" column should be disabled (and have another background color) when its corresponding "ReadOnly" column contains "true".

I've tried to reach this with a customized GridCelNumericRenderer. But there were some problems.
  • The "ReadOnly" cells are not really read only. They can be entered and edited.
  • After scrolling down and up, the "ReadOnly" cells are "moving".
  • The "ReadOnly" formatting is only applyed to the TextBlock and not to the entire cell.
Please check the attached sample application, to see the problems.

Regards
Harald

Attachment: SfGridSample13_b59470b2.zip

2 Replies

HB Harald Betzler January 4, 2017 05:57 PM UTC

  • When scrolling down, the GridCellNumericRenderer will never called. The "ReadOnly" formatted cells there are only "a copy of the first cells" but do not match to the "ReadOnly" information in the corresponding column.


JG Jai Ganesh S Syncfusion Team January 5, 2017 06:30 PM UTC

Hi Harald, 
We have analyzed your query with your sample. In that you have displayed the disabled cells through OnInitializeDisplayElement of GridCellNumericRenderer and also you have applied the disabled style for TextBlock not GridCell. Hence the issues occurred. However, you can achieve this requirement by using CellTempateSelector and  CurrentCelBeginEdit event. We have already prepared a sample for this in the forums #128088, #127476.  
Regards, 
Jai Ganesh S 


Loader.
Up arrow icon