Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ralph on Apr 09, 2009 11:03
open dhtmlx forum
Trying to make cell data uppercase

The cell data doesn't seem to update to the updated Uppercase for some reason. I've even got the return true; in the code.

    mygrid.attachEvent("onEditCell", function(stage,id,index,new_val){
        if (stage==2)
     return (new_val||"").toString().toUpperCase();
     return true;
    });


Is there something else that could be conflicting with it?
Answer posted by dhxSupport on Apr 10, 2009 03:21

Change your code like this:

mygrid.attachEvent("onEditCell", function(stage,id,index,new_val){ 
  if (stage==2) {
  mygrid.cellById(id,index).setValue(new_val.toString().toUpperCase()); 
  return true;
  }
  return true; 
  });

Answer posted by Ralph on Apr 10, 2009 08:41
That worked! Thanks again!