Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Changing background of disabled cell in XamDataGrid
posted

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.

Parents
  • 138253
    Offline posted

    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.

Reply Children