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
180
Data trigger not firing on newly added record
posted

hi,

i have a xamdatagrid with below style for certain columns:

<Style x:Key="someKey" TargetType="{x:Type editors:XamTextEditor}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter  Property="IsEnabled" Value="False"/>
        <Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsInEditMode" Value="True"/>
                    <Condition Property="IsEnabled" Value="True"/>
                </MultiTrigger.Conditions>
                <Setter Property="BorderBrush" Value="Black" />
                <Setter Property="Background" Value="Black" />
            </MultiTrigger>
            <DataTrigger Binding="{Binding Path=Cells[16].Value}" Value="ALL">
                <Setter  Property="IsEnabled" Value="True"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>


basically im trying to enable to disable certain columns based on the value of another column ( the key column of that row). Now it works fine for all existing records, for the record that i just created from addRecord, it doesnt work. It does work after i collapse the fieldLayout then expand it which i guess did a re-paint. Could you advise what i could be missing here please?

thanks

Parents
  • 138253
    Verified Answer
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into it and I created a sample project for you following your scenario and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.

     

    Looking forward for your reply.    

    XamDataGridAddNew.zip
Reply Children