Hi,
I'm disabling CellValuePresenter for certain cells for which I don't want user to edit the data. Now the problem is that, Row Hover wont highlight the cell properly as it is greyed out.
I've tried to set the background of Main Border in the CellValuePresenter to Transparent - But it didn't help. I need to change the background of "PART_EditorSite" to Transparent as well. How can I achieve that ?
Thanks in Advance.
Hello Sumit,
Thank you for your post. I have been looking into it and I can suggest you add the following Brushes, which has dynamic keys, in the XamDataGrid’s Resources:
<SolidColorBrush x:Key="{x:Static igEditors:EditorsBrushKeys.TextEditorForegroundKey}" Color="BlueViolet" /> <SolidColorBrush x:Key="{ComponentResourceKey {x:Type igEditors:XamTextEditor}, TextEditorBackgroundDisabled}" Color="PeachPuff" />
The first one is for the Foreground color and the second one is for the Background color of a disabled cell. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
Hi Stefan,
Thanks for the reply. I tested the solution you provided - but it isn't working for me. The below code however, works like a charm :
<Style TargetType="{x:Type igEditors:XamTextEditor}">
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#66F4F4F4" />
</Trigger>
</Style.Triggers>
</Style>
Thanks,
Sumit
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.