This is a migrated thread and some comments may be shown as answers.

character case property on GridViewTextBoxColumn

6 Answers 96 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Roger
Top achievements
Rank 1
Roger asked on 22 Dec 2017, 04:56 AM

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

Sort by
0
Hristo
Telerik team
answered on 22 Dec 2017, 03:29 PM
Hello Roger,

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
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Roger
Top achievements
Rank 1
answered on 02 Jan 2018, 03:30 AM

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

 

0
Roger
Top achievements
Rank 1
answered on 02 Jan 2018, 03:33 AM

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

0
Roger
Top achievements
Rank 1
answered on 02 Jan 2018, 03:34 AM
having problems posting
0
Roger
Top achievements
Rank 1
answered on 02 Jan 2018, 03:44 AM

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
0
Hristo
Telerik team
answered on 02 Jan 2018, 11:51 AM
Hello Roger,

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
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Roger
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Roger
Top achievements
Rank 1
Share this question
or