Hi! I'm trying to add new row in NOT edit mode, but new row always in edit mode. Is it possible to add new row in NOT edit mode?
Example:
Example:
public class CustomKeyboardCommandProvider : DefaultKeyboardCommandProvider
{
private GridViewDataControl parentGrid;
public CustomKeyboardCommandProvider(GridViewDataControl grid)
: base(grid)
{
this.parentGrid = grid;
}
public override IEnumerable<ICommand> ProvideCommandsForKey(Key key)
{
List<ICommand> commandsToExecute = base.ProvideCommandsForKey(key).ToList();
if (key == Key.Enter)
{
commandsToExecute.Clear();
commandsToExecute.Add(RadGridViewCommands.CommitEdit);
commandsToExecute.Add(RadGridViewCommands.BeginInsert);
commandsToExecute.Add(RadGridViewCommands.CommitEdit);
this.parentGrid.ChildrenOfType<GridViewScrollViewer>().First().ScrollToEnd();
}
return commandsToExecute;
}
}