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. Image for the cookie policy date

CharacterChasing in TextBox cell

I noticed that you can not switch the character chasing of a TextBox-Column to only allow upper or lower characters. Is there any simple way to do this or do I have to derive my own CellStyle to do this? And if I derive my own CellStyle do I have to use the normal MS TextBox? What features do I loose if I do use the normal TextBox?

1 Reply

AD Administrator Syncfusion Team March 30, 2003 09:23 AM

One way you can do this withour deriving a celltype is to handle the CurrentCellKeyPress event and make any lowercase characters upper case by setting e.Handled to true and using SendKeys to send the upper case character.
private void gridDataBoundGrid1_CurrentCellKeyPress(object sender, KeyPressEventArgs e)
{
	if(char.IsLower(e.KeyChar))
	{
		SendKeys.Send(char.ToUpper(e.KeyChar).ToString());
		e.Handled = true;
	}
}

Loader.
Live Chat Icon For mobile
Up arrow icon