Custom in-place editor and arrow keys

Hello!

I have my own rtf editor (derived from RichTextBox) that I use as in-place editor in grid.

I have my cell renderer derived from GridGenericControlCellRenderer that works fine, I can edit and save my data in my custom editor.

But when I press left or right key the Grid handles this and changes the cell instead of passing this command key to in-place editor and move the cursor.

I tried to override ProcessKeyEventArgs and pass message to my editor, but it doesn't work for some reason.

How to pass control keys to in-pace editor?

--Yuri--

3 Replies

YD Yuri Dubovitsky May 7, 2009 08:05 PM UTC

an example of the code

class myEditorRenderer: GridGenericControlCellRenderer
{
........
protected override bool ProcessKeyEventArgs(ref Message m)
{
if (activeEditor != null && activeEditor.Visible && activeEditor.Focused)
{
return activeEditor.RaiseKeyEventArgs(ref m);
}
return base.ProcessKeyEventArgs(ref m);
}
}


class myEditor : RichEditBox
{
....
public bool RaiseKeyEventArgs(ref Message m)
{
return this.ProcessKeyEventArgs(ref m);
}
}


YD Yuri Dubovitsky May 8, 2009 02:06 PM UTC

Can anyone say why code above doesn't work?

--Yuri--


LS Lingaraj S Syncfusion Team May 14, 2009 05:00 PM UTC

Hi Yuri,

Thank you for your interest in Syncfusion Products.

Please refer this KnowledgeBase article that helps to handle the process command key in derived cell renderers.
http://www.syncfusion.com/support/forums/general/47593

Let me know if it helps.

Regards,
Lingaraj S.

Loader.
Up arrow icon