<syncfusion:GridDataVisibleColumn HeaderText=" " MappingName="Locked" Width="40" AllowResize="False" AllowDrag="False" AllowSort="False" AllowGroup="False" AllowFilter="False" ShowAdvanceFilteringOptioninExcelLikeFiltering="False" ShowSearchOptioninExcelLikeFiltering="False" ShowSortOptioninExcelLikeFiltering="False"> <syncfusion:GridDataVisibleColumn.CellItemTemplate> <DataTemplate> <Grid Height="40" Visibility="Visible"> <Grid.Style> <Style TargetType="Grid"> <Style.Triggers> <DataTrigger Binding="{Binding Path=Locked}" Value="False"> <Setter Property="Visibility" Value="Hidden" /> </DataTrigger> <DataTrigger Binding="{Binding Path=Locked}" Value="True"> <Setter Property="Visibility" Value="Visible" /> </DataTrigger> </Style.Triggers> </Style> </Grid.Style> <Image Source="{StaticResource Image_SecurityLock}" Height="30" Width="30" /> </Grid> </DataTemplate> </syncfusion:GridDataVisibleColumn.CellItemTemplate> </syncfusion:GridDataVisibleColumn>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.
Hi Francis,
Thank you for contacting Syncfusion support,
It’s working as expected for us.
Please find the code snippet and sample below,
<Grid>
<syncfusion:GridDataControl AutoPopulateColumns="False" ItemsSource="{Binding Path=Visiblecollection}">
<syncfusion:GridDataControl.VisibleColumns>
<syncfusion:GridDataVisibleColumn HeaderText="
"
MappingName="Check" Width="40" AllowResize="False" AllowDrag="False" AllowSort="False" AllowGroup="False" AllowFilter="False" ShowAdvanceFilteringOptioninExcelLikeFiltering="False" ShowSearchOptioninExcelLikeFiltering="False" ShowSortOptioninExcelLikeFiltering="False">
<syncfusion:GridDataVisibleColumn.CellItemTemplate>
<DataTemplate>
<Grid Height="40" Visibility="Visible">
<Image Name="image11" Source="Images\Produce.jpg"/>
</Grid>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Path=Record.Data.Check}"
Value="False">
<Setter TargetName="image11" Property="Visibility"
Value="Hidden"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=Record.Data.Check}"
Value="True">
<Setter TargetName="image11" Property="Visibility"
Value="Visible"/>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</syncfusion:GridDataVisibleColumn.CellItemTemplate>
</syncfusion:GridDataVisibleColumn>
</syncfusion:GridDataControl.VisibleColumns>
</syncfusion:GridDataControl> </Grid> |
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.
Regards,
Saravanan C
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,
Regards,
Saravanan.M