Hi,
is there a character case property on GridViewTextBoxColumn like the radtextbox? My client wants everything uppercase. The only forum entry I have found dates back to 2011 and concerns the editor and formatting the appearance.
Any suggestions?
6 Answers, 1 is accepted
Thank you for writing.
There is no property controlling whether the text in the grid is displayed uppercase or not. You can still accomplish your task by handling the formatting events and changing the text of the elements: https://docs.telerik.com/devtools/winforms/gridview/cells/formatting-cells.
An alternative approach is to change how you are querying your database and have it return all of the data uppercase.
I hope this helps. Let me know if you need further assistance.
Regards,
Hristo
Progress Telerik

Hi Hristo
thanks for your suggestions but I have the grid bound to a table in a dataset and I'm using the dataset.haschanges property to check to see if any rows/fields have been updated. By using the CellFormatting event the datatable is always being updated so I can't use the dataset.haschanges property to check for data changes.
I'll have to look at something else...it's a pity that even a text box has a CharacterCasing property & the grid doesn't
Thanks
Roger

Hi Hristo
unfortunately ther grid is bound to a datatable in a dataset and I use the dataset.haschanges property to see if any editing has been done to the grid or the underlying form. With the above method the table is always changing and I can't use the dataset.haschanges property.
Will have to look at something else. Seems a shame that the normal textbox has a CharacterCasing property and the GridVewTextBox column does not.
Thanks
Roger


Have found a solution...using the CellEndEdit event.
When the cell has ended editing then it turns the contents into upper case...works a charm.
e.Row.Cells(e.ColumnIndex).Value = e.Row.Cells(e.ColumnIndex).Value.ToString.ToUpper
Thank you for writing.
I am glad that you have found a solution suitable for your actual scenario.
Let me know if you need further assistance.
Regards,
Hristo
Progress Telerik