The goal is, if there is on an editible cell, and the user starts typing, the cell should go in edit mode and accept the typed contents.
I am using the following code (the key_press is not behaving properly.. is there a better method):
{
if (this.grdMarkPrice.ActiveCell != null
&& this.grdMarkPrice.ActiveCell.Column.Header.Caption == "MarkPrice"
}
else
this.grdMarkPrice.PerformAction(UltraGridAction.BelowCell, false, false);
try
long result;
this.grdMarkPrice.ActiveCell.Column.Format = "";
this.grdMarkPrice.ActiveCell.Value = result;
} catch{ } }
I suggest that you put the editable cell into edit mode any time you active a row. That way when the user starts typing the text that he types will go into the cell. So you could handle the AfterRowActivate event and then activate the editable cell and then call the PerformAction method to put the cell into edit mode. You will also need to call the PerformAction method again in the AfterSelectChange event, otherwise the cell will go out of edit mode. I am attaching to this forum thread a sample which demonstrates how this can be done. I hope you find it helpful.