character case property on GridViewTextBoxColumn

7 posts, 0 answers
  1. Roger
    Roger avatar
    22 posts
    Member since:
    Nov 2017

    Posted 21 Dec 2017 Link to this post

    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?

  2. Hristo
    Admin
    Hristo avatar
    1259 posts

    Posted 22 Dec 2017 Link to this post

    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.
  3. Roger
    Roger avatar
    22 posts
    Member since:
    Nov 2017

    Posted 01 Jan in reply to Hristo Link to this post

    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

     

  4. Roger
    Roger avatar
    22 posts
    Member since:
    Nov 2017

    Posted 01 Jan in reply to Hristo Link to this post

    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

  5. Roger
    Roger avatar
    22 posts
    Member since:
    Nov 2017

    Posted 01 Jan in reply to Hristo Link to this post

    having problems posting
  6. Roger
    Roger avatar
    22 posts
    Member since:
    Nov 2017

    Posted 01 Jan Link to this post

    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
  7. Hristo
    Admin
    Hristo avatar
    1259 posts

    Posted 02 Jan Link to this post

    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.
Back to Top