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
735
Conditional formatting on Boolean data.
posted
Normal 0 false false false EN-US X-NONE X-NONE

 

Hi,

 

  Conditional formatting on Boolean data.

 

Requirement : We have one column in xamgrid which will bind to some boolean data. We have to display specific  image according to data i.e. either true or false.

We have  used conditional formatting as below but it is not displaying image as per data. Please let us know the solution.

 

<ig:TemplateColumn Key="Status" Width="60">

                                        <ig:TemplateColumn.HeaderTemplate>

                                            <DataTemplate>

                                                <TextBlock Text="{Binding Source={StaticResource ResourceNames},Path=MSG_SD_Status}"/>

                                            </DataTemplate>

                                        </ig:TemplateColumn.HeaderTemplate>

                                        <ig:TemplateColumn.ItemTemplate>

                                            <DataTemplate>

                                                <TextBlock Text="{Binding Status}" />

                                            </DataTemplate>

                                        </ig:TemplateColumn.ItemTemplate>

 

                                        <ig:TemplateColumn.ConditionalFormatCollection>

                                            <ig:IconConditionalFormatRule RuleExecution="AfterFilteringAndPaging" IsTerminalRule="True">

                                                <ig:IconConditionalFormatRule.Rules>

<ig:ConditionalFormatIcon  ValueType="Number" Value="1" Operator="GreaterThanOrEqualTo">

                                                        <ig:ConditionalFormatIcon.Icon>

                                                            <DataTemplate>

 <Image Source="/DecisionCenter.DashboardViewer;component/Images/Green.jpg" />

                                                            </DataTemplate>

                                                        </ig:ConditionalFormatIcon.Icon>

                                                    </ig:ConditionalFormatIcon>

                                                    <ig:ConditionalFormatIcon ValueType="Number" Value="0" Operator="GreaterThan">

                                                        <ig:ConditionalFormatIcon.Icon>

                                                            <DataTemplate>

   <Image Source="/DecisionCenter.DashboardViewer;component/Images/CIRCLE4B.PNG" />

                                                            </DataTemplate>

                                                        </ig:ConditionalFormatIcon.Icon>

                                                    </ig:ConditionalFormatIcon>

                                                </ig:IconConditionalFormatRule.Rules>

                                            </ig:IconConditionalFormatRule>

                                        </ig:TemplateColumn.ConditionalFormatCollection>

                                    </ig:TemplateColumn>

 

Thanks