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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Force Text entry in Upper Case

Thread ID:





51546 Nov 8,2006 08:13 AM UTC Nov 8,2006 08:42 AM UTC WinForms 1
Tags: GridControl
Venkatesh Venkatasubramanian
Asked On November 8, 2006 08:13 AM UTC


I am using Grid 4.1. I have a editable combobox in the grid. I would like to force Upper case entry in the combo box. Even if the user types in lower case, it should be rendered as Upper Case in real time.

Can you please let me know if this is possible.

Venkatesh V.

Administrator [Syncfusion]
Replied On November 8, 2006 08:42 AM UTC

Hi Venkatesh,

You would have to derive the combobox cell renderer and override the OnKeyPress method. Please try the attached sample and let me know if this helps.

public class MyComboBoxCellRenderer : GridComboBoxCellRenderer
public MyComboBoxCellRenderer(GridControlBase grid, GridCellModelBase cellModel)
: base(grid, cellModel)
{ this.SupportsFocusControl = true; }

protected override void OnKeyPress(KeyPressEventArgs e)
char c = e.KeyChar.ToString().ToUpper()[0];
KeyPressEventArgs arg = new KeyPressEventArgs(c);
base.OnKeyPress (arg);
e.Handled = true;

Here is a sample.

Best Regards,


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon