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.

Custom in-place editor and arrow keys

Thread ID:

Created:

Updated:

Platform:

Replies:

81016 May 7,2009 01:37 PM May 14,2009 01:00 PM Windows Forms 3
loading
Tags: GridControl
Yuri Dubovitsky
Asked On May 7, 2009 01:37 PM

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

Yuri Dubovitsky
Replied On May 7, 2009 04:05 PM

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

Yuri Dubovitsky
Replied On May 8, 2009 10:06 AM

Can anyone say why code above doesn't work?

--Yuri--

Lingaraj S [Syncfusion]
Replied On May 14, 2009 01:00 PM

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.

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.

;