We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DataTrigger issues

Thread ID:





116094 Apr 1,2014 01:55 PM UTC Apr 14,2014 12:22 PM UTC WPF 3
Tags: GridDataControl
Francis Rouleau
Asked On April 1, 2014 01:55 PM UTC

I have datatrigger issues. For some reason the binding seems to not be propagated inside the cell template at all.

 <syncfusion:GridDataVisibleColumn HeaderText=" " MappingName="Locked" Width="40" AllowResize="False"  AllowDrag="False" AllowSort="False" AllowGroup="False" AllowFilter="False" ShowAdvanceFilteringOptioninExcelLikeFiltering="False" ShowSearchOptioninExcelLikeFiltering="False" ShowSortOptioninExcelLikeFiltering="False">
            <Grid Height="40" Visibility="Visible">
                    <Style TargetType="Grid">
                            <DataTrigger Binding="{Binding Path=Locked}" Value="False">
                                <Setter Property="Visibility" Value="Hidden" />
                            <DataTrigger Binding="{Binding Path=Locked}" Value="True">
                                <Setter Property="Visibility" Value="Visible" />
                <Image Source="{StaticResource Image_SecurityLock}" Height="30" Width="30" />                  
for data rigger binding i have tried {binding} without success either, tried simply making instead of a grid a textblock with text and the visibility attached to {binding , converter{staticressourceBoolToVisibilityConverter}} AND {binding path=Locked, converter{staticressourceBoolToVisibilityConverter}} and my converter is not event hit. but the image display so it does get to it.

Anyone managed to make it work ? I have bunch of datatrigger that works perfectly except this control. FYI if you change the control to the basic WPF datagrid it works perfectly.

Also i am having alot of problem finding how to put NO header text and the only way i found if o put a space in the headertext property which is not convenient at all.

Saravanan C [Syncfusion]
Replied On April 7, 2014 11:38 AM UTC

Hi Francis,


Thank you for contacting Syncfusion support,


It’s working as expected for us. Please find the code snippet and sample below,



    <syncfusion:GridDataControl AutoPopulateColumns="False" ItemsSource="{Binding Path=Visiblecollection}">


            <syncfusion:GridDataVisibleColumn HeaderText=" "













                        <Grid Height="40" Visibility="Visible">

                            <Image Name="image11" Source="Images\Produce.jpg"/>



                            <DataTrigger Binding="{Binding Path=Record.Data.Check}" Value="False">

                                <Setter TargetName="image11"  Property="Visibility" Value="Hidden"/>


                            <DataTrigger Binding="{Binding Path=Record.Data.Check}" Value="True">

                                <Setter TargetName="image11"  Property="Visibility" Value="Visible"/>










Please find the sample in the following location:


Sample: http://www.syncfusion.com/uploads/user/directTrac/122901/DataTriggerBinding954512639.zip


For empty HeaderText there is no other way only way is put space.



Saravanan C

Francis Rouleau
Replied On April 7, 2014 12:51 PM UTC

I have no clue where this Record.Data come from but it works.

Saravanan M [Syncfusion]
Replied On April 14, 2014 12:22 PM UTC

Hi Francis,

Thanks for your update,

We have Record property for each cell. We have internally set Datacontext for each cell as GridDataCellBoundWrapper class which has the Record property and we are inheriting GridCellBoundWrapper class which has the property like CellBoundValue and Style.

Please let us know if you have any queries,





This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon