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.
Unfortunately, activation email could not send to your email. Please try again.

GridGroupingControl & EnterKeyBehavior

Thread ID:

Created:

Updated:

Platform:

Replies:

32858 Aug 9,2005 05:16 AM Aug 9,2005 08:33 AM Windows Forms 1
loading
Tags: GridControl
Mikaël Morvan
Asked On August 9, 2005 05:16 AM

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

Administrator [Syncfusion]
Replied On August 9, 2005 08:33 AM

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;
	}
}

CONFIRMATION

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.

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.

;