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

How to force grid cell UPPERCASE

Hi!

How can I force UPPERCASE to specific grid cells ?

Thanks,
Edijs

1 Reply

AD Administrator Syncfusion Team January 11, 2007 09:18 AM UTC

Hi Edijs,

For GridControl :

There is no property setting for a CellType = "TextBox" that does this. If you set the CellType to "OriginalTextBox" you can set the CharacterCasing style property.

this.gridControl[1, 1].CellType = "OriginalTextBox";
this.gridControl[1, 1].CharacterCasing = CharacterCasing.Upper;

The "OriginalTextBox" is derived from System.Windows.Forms.TextBox which supports this property, but the default "TextBox" celltype is derived from RichTextBox which does not.

For GridDataBoundGrid:

By default, DataBoundGrid doesn't store any style info properties. You can not set any cell or row specific properties for the DataBoundGrid other than the CellValue. You need to handle the Model.QueryCellInfo event to do this. Through this event you can set the style properties for the grid.

To set the CharacterCasing and CellType for a cell, you check for the e.RowIndex/e.ColIndex, if that points to the row you desired, set the e.Style.CharacterCasing/e.Style.CellType for it.

See the KnowledgeBase Articles for more info.
QueryCellInfo event : http://www.syncfusion.com/Support/article.aspx?id=10351
PrepareViewStyleInfo event :http://www.syncfusion.com/Support/article.aspx?id=560

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon