In general it is not recommended to mix the custom logic from the KeyboardCommandProvider
and the logic provided by the NewRowPosition="Top"
property. Because there is no way to know which will execute first. That is why we are observing the behavior from your screen-casts.
In order to fulfill your requirement, you can use the RowEditEnded
event and a Dispatcher
with a DispatcherPriority
set to Background
in the following way:
sender, GridViewRowEditEndedEventArgs e)
RadGridView grid = sender
(e.EditAction != GridViewEditAction.Cancel)
(grid.SelectedItem == e.Row.Item && grid.Items.IndexOf(e.Row.Item) == (grid.Items.Count - 1))
(e.EditOperationType == GridViewEditOperationType.Insert)
I attached an updated version of the provided project, demonstrating the suggested approach.
I hope this helps.
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos
and start improving your app based on facts, not hunches.