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
close icon

Checkbox within GridDataControl doesn't work properly

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>


1 Reply

JG Jai Ganesh S Syncfusion Team August 19, 2016 11:53 AM UTC

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 


Loader.
Live Chat Icon For mobile
Up arrow icon