Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
65
XAMGRID conditionnal formating based on other columns data
posted

hello

i'm using infragistics xamgrid 10.3.

i have a carefull read on this "http://community.infragistics.com/silverlight/articles/conditional-formatting-with-the-xamwebgrid.aspx" and this topics "http://help.infragistics.com/Help/NetAdvantage/Silverlight/2010.3/CLR4.0/html/xamGrid_Conditional_Formatting.html"

i 've tried to used the comparison operand lessthan or greaterthan for conditionnal formatting.i've succeed to obtain wanted display by using hard coded value such as value="50" but when i try any kind of binding on this value it failed.

so my goal based on your code is as follows :

<ig:XamGrid Grid.Row="0" x:Name="MyDataGrid" AutoGenerateColumns="false">
<ig:XamGrid.ConditionalFormattingSettings>
<ig:ConditionalFormattingSettings
AllowConditionalFormatting="True"/>
</ig:XamGrid.ConditionalFormattingSettings>
<ig:XamGrid.Columns>
<ig:TextColumn Key="ProductID"/>
<ig:TextColumn Key="ProductName"/>
<ig:TextColumn Key="QuantityPerUnit"/>
<ig:TextColumn Key="UnitPrice"/>
<ig:TextColumn Key="UnitsInStock">
<ig:TextColumn.ConditionalFormatCollection>
<ig:GreaterThanConditionalFormatRule Value="{Binding Path=Rowdata.
UnitsOnOrder}" StyleToApply="{StaticResource Style1}"/>
<ig:lessThanConditionalFormatRule Value="
{Binding Path=Rowdata.UnitsOnOrder}" IsTerminalRule="True" StyleToApply="{StaticResource Style2}"/>
</ig:TextColumn.ConditionalFormatCollection>
</ig:TextColumn>
<ig:TextColumn Key="UnitsOnOrder"/>
<ig:TextColumn Key="ReorderLevel"/>
<ig:TextColumn Key="Discontinued"/>
</ig:XamGrid.Columns>
</ig:XamGrid>

Should you provide any issue to ressolve this ?

best regards