Results 1 to 2 of 2

Thread: How to enter text into editable grid as all UPPERCASE?

  1. #1
    Sencha User
    Join Date
    Dec 2013
    Posts
    52
    Answers
    1

    Default How to enter text into editable grid as all UPPERCASE?

    I have a grid that is editable. I'm currently using fieldStyle: "text-transform:uppercase" which makes user input all uppercase. But once this text is entered and you are no longer in the editor view, the text becomes all lowercase. Is there a way around this?

    thanks in advance!

  2. #2
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    114
    Answers
    4

    Default

    How about changing the value in the edit or validateedit listener of the grid? You could maybe get the value, use javascript toUpperCase() method and store this in the record.

    Code:
    validateEdit: function(editor, context){
     context.record. set('yourValue', context.value.toUpperCase());
    }
    Not sure if this will work but it's an idea.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •