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
190
MultidataTrigger - Performance issue on scrolling down the grid
posted

Hello,

I have a grid with several columns associated with the data. A few columns are dynamically made editable / non editable based certain rules, also have color coding for the editable and non editable ones. 

I have greens for the non-editables', whites / yellows for the editables' and Linen for the conditional editable cells. 

I have used MultiDataTrigger for performing the color coding and the colors are all set perfectly based on the mapping that I have cached from the database. 

Every scroll down of the grid, I hit the get property and capture the flag corresponding to the columns and color the cells. This is usual, there are no issues when I have the only lines of code to color the cells green, however, when the color coding of linen comes in, here starts all the issues with the performance of the scroll - would take ages to just move down the grid for a single scroll. Please find the code snippet below. Your help will be precious!

<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding .DataItem.Price_Flag}" Value="False" />
<Condition Binding="{Binding .DataItem.Ipload_Done}" Value="True" />
<Condition Binding="{Binding .DataItem.Front_Month}" Value="True" />
<Condition Binding="{Binding RelativeSource={RelativeSource Self},Path=Field.Name}" Value="Price_chg"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" Value="{StaticResource StaticLiquidityConf}"/>
</MultiDataTrigger>

<LinearGradientBrush x:Key="StaticLiquidityConf" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Offset="0" Color="Linen"/> <!--Crimson-->
<GradientStop Offset="1" Color="Linen"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>

Thanks & Regards,

Sudarshan 

Parents
No Data
Reply
  • 138253
    Offline posted

    Hello Sudarshan,

     

    Thank you for your post. I have been looking into and I can suggest you check your Output for any binding errors or exceptions and try to fix them if there are any. Otherwise I can suggest you send me an isolated sample project where this is reproduced, so I can investigate it further for you.

     

    Looking forward for your reply.

Children
No Data