I am currently using version 20103.2159 of the XamGrid and I am having issues with creating a Conditional Format Rule with a Style Scope of Row. If I set the Scope to Cell it will format the cell just fine but when I set the Scope to Row I don't get any change. The object I am binding to implements INotifyPropertyChanged. Am I doing something wrong or is this a bug? The XAML for my column is below.
P.S. There needs to be a better way to display code on this forum. Copying and pasting from Visual Studio makes for some ugly formatting.
<ig:TextColumn Key="State">
<ig:TextColumn.ConditionalFormatCollection>
<ig:NotEqualToConditionalFormatRule StyleScope="Row" Value="Unchanged">
<ig:NotEqualToConditionalFormatRule.StyleToApply>
<Style TargetType="ig:ConditionalFormattingCellControl">
<Setter Property="FontWeight" Value="Bold" />
</Style>
</ig:NotEqualToConditionalFormatRule.StyleToApply>
</ig:NotEqualToConditionalFormatRule>
</ig:TextColumn.ConditionalFormatCollection>
</ig:TextColumn>
I must be doing something wrong on my end or I have a slightly different configuration that is causing it not to work for me. I was able to set your example to the XAML settings that I have and it was working so I'll have to investigate what is causing my issue. Thank you for the example.
Attached is a sample showing how this could work.
You would need to add in the Grid and Infragistics.Silverlight references.
In the sample, when you click the left button the "name" value is changed, which also changes the RowState property.
I have installed the latest service release and I can get conditional row formatting to work now but not for my scenario. The snippet below shows the XAML for my conditional row format and what I would like to happen is that all the rows are in an unchanged state but when the data is changed or a new row is added the state is modified or new. If set in code the state to be modified that row will get formatted correctly when the data is initially loaded. However, under normal usage where all the data is unchanged until you modify it the row is not updated. It is under my impression that the setting ShouldRefreshOnDataChange when set to True should update the row format when the state is changed to modified but that is not working. My object that I am binding with does implement INotifyPropertyChanged so I know that can't be an issue. Is this another bug or am I just doing something wrong?
<ig:NotEqualToConditionalFormatRule StyleScope="Row" Value="{StaticResource Unchanged}" ShouldRefreshOnDataChange="True">
Hi,
you have encountered a bug which is already fixed. It will be out with the next service release which is expected to be out around the end of this week.
Regards,