Hi
I am having difficulty disabling in cell editing in the whole grid. What I am looking for is behavior similar to an old fashioned list view in the report view (ie click a row anywhere to select the whole row).
I have tried playing with the SelectionTypeRecord, SelectionTypeField and SelectionTypeCell properties but they have no effect. I know this can be achieved on a cell by cell basis but this seems a bit of an inefficient way of doing it. Does anyone know why the aforementioned properties have no effect or am I just missing something?
Also could someone point me at how the change the colour of cell text in C# from the codebehind, I am new to WPF but am I looking at altering a style?
Thanks
Alan
Thanks for clearing that out. You have to "inherit" the style for the DataRecordCellArea from the one of the theme like this:
namespace for themes: xmlns:Themes="http://infragistics.com/Themes"
...
<Style TargetType="{x:Type igDP:DataRecordCellArea}" BasedOn="{x:Static Themes:DataPresenterOnyx.DataRecordCellArea}">
No. The color of the text is a second effect.
What I mean is that Onyxs theme, when you move the mouse over the records, shows the row in orange .
DataRecordCellArea.BackGroundHover is grey and it should be the Onyx color.
If this is the case, you have to use the following style (option 3 once again)
<Style TargetType="{x:Type igDP:CellValuePresenter}">
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderHoverBrush" Value="Transparent"/>
<Setter Property="ForegroundHoverStyle">
<Setter.Value>
<Style TargetType="ContentPresenter">
<Setter Property="TextElement.Foreground" Value="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type igDP:CellValuePresenter}}}"/>
</Style>
</Setter.Value>
</Setter>
What this "complex" binding does is to bind the Foreground hover color to the Foreground color.
Let me know if you have any questions on this.
Just to make sure I am on the right track, when you hover over the cell, you want the color of the text (Red,Green) not to change, right?
I'm sorry. I've forgotten saying this effect occurs in Option 3 CellValuePresenter.