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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Multiple checkbox in a cell

Thread ID:

Created:

Updated:

Platform:

Replies:

149425 Nov 26,2019 03:51 AM UTC Nov 27,2019 05:19 AM UTC WPF 3
loading
Tags: SfDataGrid
Ariel
Asked On November 26, 2019 03:51 AM UTC

Hi

Ontap enable edit not working in 2nd check box inside the cell. Is there a way to enable on tap in 2nd checkbox?

Here's my sfdatagrid settings 

 <syncfusion:SfDataGrid x:Name="datasheetsGrid"  
                                       Style="{StaticResource datasheetGridStyle}"                           
                                       ItemsSource="{Binding Model.DataSheets, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                       SelectedItem="{Binding Model.SelectedDataSheets, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" SelectionMode="Single" NavigationMode="Cell"
                                       ScrollViewer.VerticalScrollBarVisibility="Auto"  EditTrigger="OnTap">

  <syncfusion:SfDataGrid.Columns>

                        <syncfusion:GridTemplateColumn AllowSorting="False" Padding="5" >
                            <syncfusion:GridTemplateColumn.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock Text="Test Status" Style="{StaticResource GridHeaderStyle}"/>
                                </DataTemplate>
                            </syncfusion:GridTemplateColumn.HeaderTemplate>
                            <syncfusion:GridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="*"/>
                                            <RowDefinition Height="*"/>
                                            <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <CheckBox  IsChecked="{Binding IsConducted,  Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="4,4"  syncfusion:FocusManagerHelper.FocusedElement="True">
                                            <TextBlock Text="Conducted" FontWeight="Bold" Margin="0,-2,0,0"/>
                                        </CheckBox>
                                        <CheckBox  Grid.Row="1" IsChecked="{Binding IsWaived, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"  Margin="4"  syncfusion:FocusManagerHelper.FocusedElement="True">
                                            <TextBlock Text="Waived"  Margin="0,-3,0,0"/>
                                        </CheckBox>

                                    </Grid>
                                </DataTemplate>
                            </syncfusion:GridTemplateColumn.CellTemplate>
                        </syncfusion:GridTemplateColumn>

Thanks

Mohanram Anbukkarasu [Syncfusion]
Replied On November 26, 2019 12:52 PM UTC

Hi Ariel,   
  
Thanks for contacting Syncfusion support.    
  
We have prepared a sample using the provide code example and we are able to reproduce the reported scenario in our end. You can resolve this by creating a custom renderer for the template column to set focus on single tap as shown in the below code example.   
  
Code example:    
  
this.dataGrid.CellRenderers.Remove("Template");   
this.dataGrid.CellRenderers.Add("Template", new GridCellTemplateExt());   
   
   
public class GridCellTemplateExt : GridCellTemplateRenderer   
{   
    protected override void SetFocus(FrameworkElement uiElement, bool needToFocus)   
    {   
        if (!needToFocus)   
            DataGrid.Focus();   
    }   
}   
  
  
  
Please let us know if you require further other assistance from us.    
  
Regards,   
Mohanram A  


Ariel
Replied On November 26, 2019 10:27 PM UTC

Thanks it works

Farjana Parveen Ayubb [Syncfusion]
Replied On November 27, 2019 05:19 AM UTC

Hi Ariel, 
 
Thanks for the update. 
 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
 
Regards, 
Farjana Parveen A 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon