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
4341
Change font color of cell (with button) depending on value of another column
posted

Hello Support,

We need to change the foreground for a cell depending upon the value of another column. This cell already has a style for displaying a button within the cell when in edit mode or when selected. We were able to change the cell font color, however after the user selects the colored cell and then clicks on another cell of the same record (with the mouse pointer in the same record too), the font color turns to black again. Also after the user selects the colored cell and then clicks on another record, hovering on the colored cell turns its font color to black again.

We have attached herewith a sample code and video for your reference. We need the cell whose dataRecord.Cells("IsCustomerSpecificPricing").Value=True do be displayed in a different color at all times (editing, mouse hover, normal selection).

Awaiting your response. Thank You.

XamDataGrid_Searc_Latest.zip
Parents
  • 138253
    Verified Answer
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into it and the sample you have attached and I modified it, so now it works as you want. Basically I changed the Binding in the XamNumericEditor’s Style’s Trigger, because the DataContext is XamNumericEditor and you need to reach the DataRecordPresenter. Now the Foreground changes only when the IsCustomerSpecificPricing Property changes. Please let me know if this helps you or you have further questions on this matter.

     

    Looking forward for your reply.

    XamDataGrid_Searc_Latest_Modified.zip
Reply Children