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.
Syncfusion Feedback

Grouping Control

Thread ID:

Created:

Updated:

Platform:

Replies:

70115 Nov 27,2007 10:15 PM UTC Nov 29,2007 10:06 AM UTC Windows Forms 1
loading
Tags: Grouping
Prem
Asked On November 27, 2007 10:15 PM UTC

I am using a Grouping Grid. Normally I enter some data in the row - the row displays a pencil icon to show I am in edit mode. After entering data - I hit enter to commit changes to the grid row.
How would I commit changes and navigate to the next column below.
Also, how would I commit changes to the grid row by hitting the down arrow or the tab key?


Jisha Joy [Syncfusion]
Replied On November 29, 2007 10:06 AM UTC

Hi Prem,

Thank you for your interest in Syncfusion Products.

This can be achieved by handling the TableControlCurrentCellKeyDown event of the GridGroupingControl. We can commit changes and navigate to the grid to the below cell in the same column by capturing the Enter key and call the MoveDown() method of e.TableControl.CurrentCell. When the grid is navigate to the next row it will automatically committed the changes. Similarly we can capture the Tab in this event and call the EndEdit method of the e.tableControl.Table to commit the changes.
Here is the code snippets:


void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlKeyEventArgs e)
{
if (e.Inner.KeyCode == Keys.Enter)
{
e.TableControl.CurrentCell.MoveDown();
e.Inner.Handled = true;
e.Inner.SuppressKeyPress = true;
}
if (e.Inner.KeyCode == Keys.Tab)
{
e.TableControl.Table.EndEdit();
}

}

Please refer the sample in the link to illustrate this:
http://websamples.syncfusion.com/samples/Grid.Windows/70115/main.htm

Please try this and let me know if this helps.

Regards,
Jisha



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.

Warning Icon 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.Close Icon

;