Is there any way to change cell or column background or foreground colours?
You can see an example of conditional formatting here:
http://blogs.infragistics.com/blogs/alex_fidanov/archive/2010/01/12/howto-using-wpf-converters-to-style-the-xamdatagrid.aspx
How could I select a cell dynamically in c# code and change the background colour of that cell?
For example, I want to select a cell at row 6 and column 5, and then change the background colour of that cell to red.
I am new to the datagrid control. Thank you for answering my questions.
I passed a valid DataRecord and Field to CellValuePresenter.FromRecordAndField, but it returned null value. What do you think might go wrong?
Can you provide a sample application so that we can look into it?
Attached is a sample application made by using your object data binding sample.
Hi Alex, did you have a chance to have a look at the sample I sent to you last week?
Hi WPFDEV,
You can do this in xaml as well by defining a style and on event trigger change the background red
<Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key="SelectedCellStyle">
>
="True" >
="Red"/>