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.
Unfortunately, activation email could not send to your email. Please try again.

Checkbox within GridDataControl doesn't work properly

Thread ID:

Created:

Updated:

Platform:

Replies:

125441 Aug 18,2016 04:24 AM Aug 19,2016 07:53 AM WPF 1
loading
Tags: GridDataControl
Rajesh Sharma
Asked On August 18, 2016 04:24 AM

I have a checkbox within a GridDataControl,. When I check or uncheck a check box, it only takes affect when I select a different row on the grid. It doesn't check/uncheck immediately.
See the following code:

<syncfusion:GridDataControl

Grid.Row="0"

FontFamily="Verdana" FontSize="10.9"

ListBoxSelectionMode="One"

x:Name="layoutGrid"

NotifyPropertyChanges="True"

ShowAddNewRow="False" AutoPopulateColumns="False" AutoPopulateRelations="False" ShowColumnOptions="False" ColumnSizer="Auto"

AlternatingRowBackground="#FFE9F3F6" TextSearch.TextPath="Entity.FullName" AllowDelete="False"

FilterBarPredicateType="And" FilterBarMode="Immediate" BorderBrush="Black" BorderThickness="2" VisualStyle="DefaultOffice2007Blue"

Padding="10" Margin="10,0,0,19"

ItemsSource="{Binding FormLayouts}"

SelectedItem="{Binding SelectedFormLayout}"

IsSynchronizedWithCurrentItem="True">

<syncfusion:GridDataControl.VisibleColumns>

<syncfusion:GridDataVisibleColumn MappingName="LayoutDescription" IsReadOnly="True" HeaderText="Layout" Width="Auto"/>

<syncfusion:GridDataVisibleColumn MappingName="DefaultLayout" HeaderText="Default" Width="60">

<syncfusion:GridDataVisibleColumn.ColumnStyle>

<syncfusion:GridDataColumnStyle CellType="CheckBox" HorizontalAlignment="Center" IsThreeState="False" />

syncfusion:GridDataVisibleColumn.ColumnStyle>

<syncfusion:GridDataVisibleColumn.HeaderStyle>

<syncfusion:GridDataColumnStyle HorizontalAlignment="Center"/>

syncfusion:GridDataVisibleColumn.HeaderStyle>

syncfusion:GridDataVisibleColumn>

syncfusion:GridDataControl.VisibleColumns>

syncfusion:GridDataControl>


Jai Ganesh S [Syncfusion]
Replied On August 19, 2016 07:53 AM

Hi Rajesh, 
 
You can achieve your requirement by setting the UpDateMode as “PropertyChanged” in a column like below, 
 
<Syncfusion:GridDataVisibleColumn MappingName="IsChecked" 
                                  HeaderText="Default"  
                                  Width="60"  
                                  IsReadOnly="False" UpdateMode="PropertyChanged"> 
 
                    <Syncfusion:GridDataVisibleColumn.ColumnStyle> 
 
                        <Syncfusion:GridDataColumnStyle CellType="CheckBox" HorizontalAlignment="Center"  /> 
 
                    </Syncfusion:GridDataVisibleColumn.ColumnStyle> 
</Syncfusion:GridDataVisibleColumn> 
 
Sample
 
Regards, 
Jai Ganesh 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.

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.

;