Hi,
I have a XamDataGrid that shows a list of Orders. I am trying to highlight any rows in red (either foreground or background doesn't matter) where the DueDate of the Order has passed.
I was wondering if there is an example anywhere or someone could point me in the right direction of where to start?
Cheers,Dave
Hi Dave,
For similar functionality you can check the "Conditional Formatting" sample in the WPF samples browser, located at:
xamDataGrid / Display / Conditional formating
For more information you can also check the following topic in the documentation:
http://help.infragistics.com/doc/WPF/2013.2/CLR4.0/?page=xamDataGrid_CellValuePesenterStyleSelector_Reevaluated.html
If you have any other questions please do not hesitate to ask.
Sincerely,
Radko
Principal Product Developer (XAML)
Infragisticswww.infragistics.com/support
Hello,
I am just checking if you require any further assistance on the matter.
Sincerely,RadkoPrincipal Product Developer - XAMLInfragisticswww.infragistics.com/support
hi Krasimir,
Apologies for not getting back to you sooner. I have managed to get things working from your example and do not require any further assistance.
Hello David,
Krasimir, MCPD
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
Thank you for your reply. I have created a sample application for you, that shows how you can change the foreground, hover foreground and alternate foreground of the records of the XamDataGrid, using triggers and style for the DataRecordCellArea and CellValuePresenter. The approach also needs to override the style for the hover foreground for the DataRecordCellArea. This style is with ComponentResourceKey of GrayForegroundStyle.
Please let me know if you need any further assistance on the matter.
Thanks for your help. I have no been able to get this to work using the example you provided.
The only thing is this doesn't seem to work if I have HighlightAlternateRows="True" and also doesn't change the text colour when I hover over a row. Is there somewhere else that I have to set the StyleSelector for Hover and Alternate rows?
Thank you for your feedback. Please let me know if you need any further assistance on the matter.