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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

(URGENT) DataGridCheckBoxColumn inside Syncfusion Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

103680 May 24,2012 09:20 AM UTC May 25,2012 10:06 AM UTC WPF 1
loading
Tags: GridControl
Sunil
Asked On May 24, 2012 09:20 AM UTC

Hi,

I was using DataGrid in my project, recently which has been replaced with syncfusion grid. There was a checkbox column inside DataGrid which I was using to bind the IsChecked property.

And on the check/uncheck of checkbox, a button (outside the grid) gets enabled/disabled.

I have used below code to accomplish the task:

<syncfusion:GridDataVisibleColumn MappingName="IsChecked">
                    <syncfusion:GridDataVisibleColumn.CellItemTemplate>
                        <DataTemplate>
                            <CheckBox
                                             syncfusion:VisualContainer.WantsMouseInput="true"
                                             VerticalContentAlignment="Center">
                                <CheckBox.Content>
                                    <Binding Path="CellBoundValue"
                                                     Mode="TwoWay"
                                                     UpdateSourceTrigger="PropertyChanged">
                                    </Binding>
                                </CheckBox.Content>
                            </CheckBox>
                        </DataTemplate>
                    </syncfusion:GridDataVisibleColumn.CellItemTemplate>
                </syncfusion:GridDataVisibleColumn>

And here is the code which I was using in DataGrid to achieve the same functioanlity:

<DataGridCheckBoxColumn Binding="{Binding IsChecked, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>

 

Please help me to get out of this problem. Do reply my ASAP.

Thanks,

Sunil Goel

 


S. Kannan [Syncfusion]
Replied On May 25, 2012 10:06 AM UTC

Hi Sunil,

 

Thanks for you update.

 

You can achieve your requirement by using the below two ways.

 

Way 1: Using CheckBox CellType

 

You can use our inbuilt CheckBox cell type to achieve your requirement and the following is the XAML snippet to use the inbuilt Check Box  cellType.

 

Code Snippet [XAML]

 

 <syncfusion:GridDataVisibleColumn MappingName="IsChecked">
                <syncfusion:GridDataVisibleColumn.ColumnStyle>
                    <syncfusion:GridDataColumnStyle CellType="CheckBox"/>
                </syncfusion:GridDataVisibleColumn.ColumnStyle>
            </syncfusion:GridDataVisibleColumn>

 

 

Way 2: Using Data Template CellType

 

You can also use Data Template cell type to achieve your requirement and the following is the XAML snippet to use the Data Template Cell Type.

 

Code Snippet [XAML]

 

<syncfusion:GridDataVisibleColumn MappingName="IsChecked">
       <syncfusion:GridDataVisibleColumn.CellItemTemplate>
            <DataTemplate>
                 <CheckBox syncfusion:VisualContainer.WantsMouseInput="true" IsChecked="{Binding CellBoundValue, Mode=TwoWay}"
                                  VerticalContentAlignment="Center"/>
            </DataTemplate>
       </syncfusion:GridDataVisibleColumn.CellItemTemplate>
</syncfusion:GridDataVisibleColumn>
 

 

Please let us know if you have any queries.

 

Regards,

Kannan. S


CONFIRMATION

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.

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

;