[c#]
internal class MyGrid : FlyGrid
{
public MyGrid()
{
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
bool res = base.ProcessCmdKey(ref msg, keyData);
if (keyData == Keys.Return)
{
if (ActiveRootPort.EndEdit(true))//commit changes
{
MyNode newNode = new MyNode(new object[] { 1, DateTime.Now });
ActiveRootPort.Rows.Items.Add(newNode);
this.Selected = newNode;
return true;
}
}
return base.ProcessCmdKey(ref msg, keyData);
}
}