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. Image for the cookie policy date

only one column with different checkbox look ?

Hi SF,

I have a GDC with various columns and several of them are of bool type, showing as checkboxes.
All that fine, but I would like only one column of  these bool type to look like a checked / unckecked

star, like this:

The other columns should remain with unchanged standard checkbox look.

How can I do that ? code example possible ?

Thanks,

Fabrice


3 Replies

SC Saravanan C Syncfusion Team April 23, 2014 01:07 PM UTC

Hi Fabrice,

 

We have analyzed your query and you can achieve your requirement by using DataTemplate cell type for particular column that you want to show checked/unchecked stars based on bool property type. Please find the code snippet and sample in the following location,

 

Code Snippet[XAML]:

<syncfusion:GridDataVisibleColumn MappingName="Check">                                         

    <syncfusion:GridDataVisibleColumn.CellItemTemplate>

        <DataTemplate>

            <Grid>

                <Image Name="image11" Source="Images\rating.png"/>

                <Image Name="image22" Source="Images\rating1.jpg"/>

            </Grid>

            <DataTemplate.Triggers>

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

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

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

                </DataTrigger>

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

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

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

                </DataTrigger>

            </DataTemplate.Triggers>

        </DataTemplate>

    </syncfusion:GridDataVisibleColumn.CellItemTemplate>

</syncfusion:GridDataVisibleColumn>

 

Sample: http://www.syncfusion.com/downloads/support/directtrac/123982/DataTriggerBinding-223488503.zip

 

Please let us know if you have any queries.

 

Regards,

Saravanan C



FF fff April 25, 2014 06:00 AM UTC

Thanks Saravanan
It works perfectly !
Fabrice


SC Saravanan C Syncfusion Team April 28, 2014 02:43 PM UTC

Hi Fabrice,

Thanks for your replay.

Please let us know if you need further assistance.

Regards,

Saravanan C


Loader.
Live Chat Icon For mobile
Up arrow icon