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. Image for the cookie policy date

GridGroupingControl & EnterKeyBehavior

Hi, This code seems not work with the GridGroupingControl (version 3.2.1.0) : this.ggc1.TableModel.Options.EnterKeyBehavior = GridDirectionType.Right; How can i obtain this behavior in my GridGroupingControl ? Regards, Mikaël

1 Reply

AD Administrator Syncfusion Team August 9, 2005 12:33 PM UTC

Currently, there is no property setting to handle this in a GridGroupingControl. You can get this behavior by handling these 2 event: TableControlCurrentCellControlKeyMessage += new GridTableControlCurrentCellControlKeyMessageEventHandler(gridGroupingControl1_TableControlCurrentCellControlKeyMessage); this.gridGroupingControl1.TableControlCurrentCellKeyDown The handlers.
private void gridGroupingControl1_TableControlCurrentCellControlKeyMessage(object sender, GridTableControlCurrentCellControlKeyMessageEventArgs e)
{
	Keys keyCode = (Keys) ((int)e.Inner.Msg.WParam) & Keys.KeyCode;
	if(keyCode == Keys.Enter && e.Inner.Msg.Msg == 0x100 //WM_KEYDOWN
		)
	{
		e.TableControl.CurrentCell.MoveRight();
		e.Inner.Handled = true;
		e.Inner.Result = true;
	}
}

private void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e)
{
	if(e.Inner.KeyCode == Keys.Enter// && e.Inner.Msg.Msg == 0x100 //WM_KEYDOWN
		)
	{
		e.TableControl.CurrentCell.MoveRight();
		e.Inner.Handled = true;
	}
}

Loader.
Up arrow icon