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

How to add new row in SFDatagrid ??

Thread ID:





120968 Oct 29,2015 10:28 PM UTC Nov 2,2015 09:17 AM UTC WPF 3
Tags: SfDataGrid
Luis Fernando
Asked On October 29, 2015 10:28 PM UTC

pressed as add new row , 
I want to completely add , 
without the need to switch to another row so
 that it can carry out the addition of the new row.??


I do not want it then appears as if it had been added ,
I want to add a new row pressed as the new row is added and then appears the option to add another row

Ayyanar Sasi Kumar Jeyaraj [Syncfusion]
Replied On October 30, 2015 02:00 PM UTC

Hi Luis,

Thank you for contacting Syncfusion support.
We have analyzed your  query.
You can able to add the new row continuously without moving the Selection to another row by using the
CurrentCellActivated Event like below,

private void datagrid_CurrentCellActivated(object sender,

CurrentCellActivatedEventArgs args)


            bool needToMove = (datagrid.IsAddNewIndex(args.PreviousRowColumnIndex.RowIndex)

                && !datagrid.IsAddNewIndex(args.CurrentRowColumnIndex.RowIndex)

                && (Keyboard.IsKeyDown(Key.Enter) || Keyboard.IsKeyDown(Key.Tab)));

            Dispatcher.BeginInvoke(new Action(() =>


                var gridModel = this.datagrid.GetGridModel();

                var columnIndex = this.datagrid.GetFirstColumnIndex();

                if (needToMove && gridModel != null)


                    this.datagrid.MoveCurrentCell(new RowColumnIndex(gridModel.AddNewRowController.GetAddNewRowIndex(), columnIndex));


            }), DispatcherPriority.ApplicationIdle);

In above code snippet, we have considered the Enter and Tab key to restrict the Selection to another row while adding new row. If you did a mouse interaction or arrow keys other than Enter and Tab key if the current Selection is in AddNewRowControl, you can able to switch another row  from AddNewRow position.

We have also prepared the sample for this requirement and you can download the sample from following location,



Please let us know if you have any further assistance


Luis Fernando
Replied On October 30, 2015 04:27 PM UTC

thanks for help

Ayyanar Sasi Kumar Jeyaraj [Syncfusion]
Replied On November 2, 2015 09:17 AM UTC

Hi Luis,

Thank you for the update .

Please let us know if you need further assistance on this.





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