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
1531
Programmatically changing row font and color
posted
Does anyone have an example of programmatically changing a row's font and color in the xamDataGrid.  In my situation, if the use makes an edit to a row in the grid, I want to change the color of the row and also change the font to italics.
  • 138253
    Offline posted

    Hello again,

    I am just checking if you got this worked out or you still require any assistance or clarification on the matter.

    If this is what you were looking for please verify the answer so it helps other users as well.

  • 138253
    Offline posted

    Hello stevemwall,

    I have been looking into your issue and I suggest you add the following code in CellChanged event of your xamDataGrid to accomplish your goal.

    DataRecordPresenter.FromRecord(e.Cell.Record).Background = Brushes.YellowGreen;

    DataRecordPresenter.FromRecord(e.Cell.Record).FontStyle = FontStyles.Italic;

    If you need any further assistance on this issue do not hesitate to ask.