Unplanned
Last Updated: 09 Jun 2017 15:02 by ADMIN
ADMIN
Dilyan Traykov
Created on: 07 Jun 2017 10:23
Category: GridView
Type: Bug Report
1
GridView: Committing edit by pressing Enter key skips a row when grouping is performed and DataTable is used as ItemsSource
As a temporary workaround, the following custom keyboard command provider can be used:

	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.BeginEdit);
				commandsToExecute.Add(RadGridViewCommands.MoveDown);
			}

			return commandsToExecute;
		}
	}
0 comments