I need to set the handsontable column as uppercase

i have an handsontable.in that i want to implement it as uppercase.while entering data it should be in uppercase.

Hey @sathyarajendran37

You can use the native method toUpperCase https://developer.mozilla.org/pl/docs/Web/JavaScript/Referencje/Obiekty/String/toUpperCase in the afterChange hook. Just use the 4th parameter (source) to block the infinite loop of the setDataAtCell.

can u please send some samples.

I am sorry I do not have a demo that does it. However, if you wish I can schedule a development on demand service for you. Do you own an active Extended Support and Maintenance plan?

thats ok. can you explain the same thing breiefly.

What do you mean by ‘the same thing’, the development on demand or the solution for the issue that I’ve sent before?

solution for that issue.
thank you in advance.

Have you already read about the https://developer.mozilla.org/pl/docs/Web/JavaScript/Referencje/Obiekty/String/toUpperCase method? I would place it in the seDataAtCell method in the afterChange hook.

yes, i have did the thing by using custom editor…via the below code. its working fine. but the issue is while typing the new value infront of the old value, the cursor automatically came to the end of old value.

if the old value is “AB”. while trying to enter the value infront of “A”.that cursor cursor automatically came at the end of value like. “SAB(cursor point)”.

class CustomEditor extends Handsontable.editors.TextEditor {
constructor(props) {
super(props);
}
createElements = function (newValue) {
this.TEXTAREA = document.createElement(‘input’);
this.TEXTAREA.className = ‘handsontableInput’;
this.TEXTAREA.setAttribute(“input”, ‘this.value = this.value.toUpperCase()’);
Handsontable.dom.empty(this.TEXTAREA_PARENT);
this.TEXTAREA_PARENT.appendChild(this.TEXTAREA);
}

}

I am sorry but we do not have any control over the cursor - it is handles by the browser.