Hi Alex,
The attached solution having two issues. (Library : 9.2.20092.2001)
Issue 1: Click the Button2. In DataValueChanged event i changed the CellValuePresenterStyle for the changed cells. The style was applied perfectly. But that style got vanish if i sort a column or group by a column. Why it is? Issue 2: Button1 will change some cell value with DataTable.AcceptChanges(). Button2 will change some cell value without DataTable.AcceptChanges(). The Recordselector style is not executed in Button2. But after some grid operation like Sort / group by, the record selector icon will get refresh. Why it is? Advance thanks,Ramesh.P
Alex,
Yes. That solution working well.
Thanks.
Regards,
Ramesh.P
Hello Ramesh,
Actually #1 is not an issue as well. When the RecordContainerGenerationMode is Recycle, setting properties directly on the CellValuePresenters are not persistant. Instead, you can handle the InitializeCellValuePresenter event which gets called when the CVP is attached to a cell or use the ValueHistory[0].Tag property, like this:
<Window.Resources>
<Style TargetType="{x:Type igDP:CellValuePresenter}">
<Setter Property="Background" Value="{Binding Path=ValueHistory[0].Tag, RelativeSource={RelativeSource Self}}"/>
</Style>
</Window.Resources>
void myGrid_DataValueChanged(object sender, DataValueChangedEventArgs e)
{
e.ValueHistory[0].Tag = Brushes.Red;
}
No need.
I used like 'DataItem.Status'.It is working.
Thanks
If i am not adding that Field into FieldLayout.(Because the 'Status' column is not visible to end user)
, The value come to converter is always null (unset value).
Any suggession for this?
Thanks Alex.