I have a grid with an editable column (ed). After the user types something in and leaves the field I would like to turn the text into uppercase. Something like this…
myGrid.attachEvent("onEditCell", function(stage,rId,cInd,nValue,oValue){
if (stage == 2)
{
var cellObj = myGrid.cellByIndex(myGrid.getRowIndex(rId), cInd);
cellObj.cell.innerText.toUpperCase(); /* this didn't work */
cellObj.cell.outerText.toUpperCase(); /* this didn't work */
cellObj.cell.innerHTML.toUpperCase(); /* this didn't work */
cellObj.cell.textContent.toUpperCase(); /* this didn't work */
/* ajax update and other code goes here... */
}
});
None of those 4 toUpperCase()'s worked. How can I accomplish this?