Is there a way or a setting for a field in an ultrawebgrid that will only accept uppercase?
If you are asking about UltraWebGrid, you are posting on the wrong forum. This is the WinForms section.
For the WinForms grid, you would use the CharacterCasing or Casing property (I forget which) on the column.
On the WinGrid, is there a way to set the CharacterCasing on a Row by Row basis? I do not want to handle the KeyDown event to enable this and I've already tried using different editors on the Cells I want uppercase and those I want to normal which hasn't worked for me either. Any suggestions?
Hi,
There's no built-in way to do this on a row-by-row basis. But you could do this pretty easily using an unbound column.
What you would do is handle the InitializeLayout event of the grid. Hide the "real" bound column containing the strings. Then add an unbound column to the grid.
In the InitializeRow event, you can examine the row and determine what you want to display and then display it in the unbound column.
If the column is editable, then you will need to reverse this process - probably in the BeforeRowUpdate event.
Mike - That sounds like a pretty hacky workaround, about as bad as the intercepting of the KeyPress event. Anything change since you wrote this post last year?
-Dave
Hi Dave,
No, nothing has changed in this area.
I can see your point that using an unbound column isn't really any better than using the Key events. But I'm not really sure I see what's so bad about using the Key events in the first place. This seems like a rather obscure case - having some cells in a column use upper case and others not. So it probably doesn't warrant adding a property to the cell, since it's so unusual.
Or is there some use case for this that I am failing to see? :)