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

Bug on new record with cell non editable

Thread ID:





129302 Mar 10,2017 12:23 PM UTC Mar 14,2017 12:48 PM UTC WPF 3
Tags: SfDataGrid
Asked On March 10, 2017 12:23 PM UTC

When I configure a SfDataGrid with EditTrigger="OnTap" and have columns binding with AllowEditing="False" AllowFocus="False"
If I click on columns with allowediting = false in a new row, this cell has focus, and can't edit

Muthukumar Kalyanasundaram [Syncfusion]
Replied On March 13, 2017 09:42 AM UTC

Hi Javier, 

Thank you for contacting Syncfusion support. 

We have checked your query. We are not able to reproduce the reported “AddNewRow cell are not editable when we set AllowFocus and AllowEditable as false” in our side. For your reference, we have attached the sample in below location. In the attached sample, AddNewRow record cell has been focused and editable. Could you please refer it. 

If you are still facing the issue, could you please revert by modifying the attached sample based on your application along with the replication procedure?.  And could you please provide your current Syncfusion product version, it will helpful for us to analyze further.  

Please let us know if you have any query. 

Muthukumar K 

Ashwini Paranthaman [Syncfusion]
Replied On March 13, 2017 10:00 AM UTC

From: Javier 
Sent: Monday, March 13, 2017 5:54 AM
To: Syncfusion Support
Subject: RE: Syncfusion support community forum 129302, Bug on new record with cell non editable, has been updated.

Change Xaml Code from example by : 
       <syncfusion:SfDataGrid x:Name="dataGrid"  
                               Grid.Column="0" AddNewRowPosition="Top" 
                               ItemsSource="{Binding Path=OrdersDetails}" 
                <syncfusion:GridTextColumn MappingName="OrderID" AllowFocus="False" AllowEditing="False" /> 
                <syncfusion:GridTextColumn MappingName="CustomerID" AllowFocus="True" AllowEditing="True" /> 
                <syncfusion:GridDateTimeColumn Width="200" AllowFocus="False" AllowEditing="False" 
                                               HeaderText="Shipping Date" 
                                               TextAlignment="Right" /> 
                <syncfusion:GridTextColumn MappingName="EmployeeID" TextAlignment="Right" AllowEditing="False" AllowFocus="False" /> 
                <syncfusion:GridTextColumn HeaderText="Ship City" MappingName="ShipCity" AllowEditing="True" AllowFocus="True"/> 
                <syncfusion:GridTextColumn HeaderText="Ship Country" MappingName="ShipCountry" AllowEditing="False" AllowFocus="False"/> 
                <syncfusion:GridTextColumn MappingName="Freight" TextAlignment="Right" AllowEditing="True" AllowFocus="True" /> 
                <syncfusion:GridCheckBoxColumn HeaderText="Closed" MappingName="IsClosed"  AllowEditing="False" AllowFocus="False" /> 
For example, I want edit only three cells. 
On new row, I can edit all cells, and can have focus 
You can reproduce the error. 

Muthukumar Kalyanasundaram [Syncfusion]
Replied On March 14, 2017 12:48 PM UTC

Hi Javier, 
Thanks for the update. 
We have analyzed your query. You can achieve your requirement by handling CurrentCellBeginEdit  and  CurrentCellActivating event. For your reference, we have attached the code snippet and sample in below location. Could you please refer it. 
Code Snippet: 
// to disable the editmode of addnewrow in sfgrid 
this.dataGrid.CurrentCellBeginEdit += dataGrid_CurrentCellBeginEdit; 
void dataGrid_CurrentCellBeginEdit(object sender, CurrentCellBeginEditEventArgs args) 
    if (this.dataGrid.IsAddNewIndex(args.RowColumnIndex.RowIndex)) 
        args.Cancel = !args.Column.AllowEditing; 
// to disable the focus of addnewrow in sfgrid 
this.dataGrid.CurrentCellActivating += DataGrid_CurrentCellActivating; 
private void DataGrid_CurrentCellActivating(object sender, CurrentCellActivatingEventArgs e) 
    if (this.dataGrid.IsAddNewIndex(e.CurrentRowColumnIndex.RowIndex)) 
        var col = e.CurrentRowColumnIndex.ColumnIndex; 
        var focus = this.dataGrid.GetDataColumnBase(e.CurrentRowColumnIndex); 
        e.Cancel = !focus.GridColumn.AllowFocus; 
To disable the editmode of addnewrow in SfDataGrid. Please refer the below link, 
Please let us know if you have any query. 
Muthukumar K 


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