PDA

View Full Version : How to enter text into editable grid as all UPPERCASE?



JohnJones357
14 Jan 2014, 9:02 AM
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!

fily55
14 Jan 2014, 9:13 AM
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.



validateEdit: function(editor, context){
context.record. set('yourValue', context.value.toUpperCase());
}


Not sure if this will work but it's an idea.