Controls in GridGroupingControl Cells

Hi, I have my cell type for a particular column in my GridGroupingControl set to "Control" and have added a custom UserControl as the control. This UserControl mereley consists of a textbox with the Multiline property set to true.

So when I run the application, entering text in the text box control in the grid cell works fine, but when I press Delete, Enter, Home, Page Up/Down, or End, the text box is not reading these keys. Is there a way I can fix this? Thanks.

3 Replies

AD Administrator Syncfusion Team September 14, 2006 07:15 AM UTC

Hi Stephen,

Yes.You can implement through CurrentCellKeyDown/TableControlCurrentCellKeyDown event handler. Please refer the attached sample for more detail and let me know if you are looking something different.

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/GGCcontrols_12595f37.zip

Best Regards,
Haneef


SG Stephen Guo September 15, 2006 05:34 PM UTC

Hey, that works, thanks. Is there any way to have the textbox process the keystroke that is pressed? I don''t want to handle every case or combinations of these buttons (shift+button, control+button) manually. Thanks.

>Hi Stephen,

Yes.You can implement through CurrentCellKeyDown/TableControlCurrentCellKeyDown event handler. Please refer the attached sample for more detail and let me know if you are looking something different.

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/GGCcontrols_12595f37.zip

Best Regards,
Haneef


AD Administrator Syncfusion Team September 18, 2006 09:50 AM UTC

Hi Stephen,

There is no default support for handling special keys of the control cell in a Grid. But you can derive the GridGenericControlCellRenderer and override the OnKeyDown method to acheive this.

The attached sample shows how you can do this in a OnKeyDown. It implements the GridGenericControlCellRenderer and prepare what ever keys you want to handle.

Sample : http://www.syncfusion.com/Support/user/uploads/GGCcontrols_d9b54eb2.zip

Please let me know if you need any further assistance.

Best Regards,
Haneef

Loader.
Up arrow icon