I want to retrieve from a dataEvents
event the value the user entered. I want to only allow the numbers 0-24 and if the user inserts a number like 4,5 (german writing) I want to replace the "," with a ".". Thus convert "4,5" to "4.5".
But I'm struggling with getting the data the user entered. The method I'm using always returns blank.
colModel:[
{name:'sum',index:'sum', width:45, editable: true, sortable:false,
editoptions: { dataEvents: [
{
type: 'keypress', // keydown
fn: function(e) {
// console.log('keypress');
var v=$(e.target).text();
alert(v); // v is empty.
//reset the target value, actually I want to replace
// enter code here a comma with a point
// only allow the numbers 0 - 24
}
}
]
}
},
],