I have a column in a jqgrid defined as number. The user is forced to enter a number like 6.5 with the comma delimeter being a point. This grid is also used by german speaking people who are used to insert numbers like this 6,5 using the comma as the delimeter.
This people are getting upset when they are not allowed to insert 6,5 instead of 6.5 :D
To make their (and in the end) my life more convenient I'm looking for a way to convert automatically the 6,5 to 6.5 . This should be done on the client side, since I want to rely on jqgrid num checking.
Thus I should check (and maybe transform) the number before jqgrid is checking it. Is this possible?
--edit--
None of these functions are called, except the first one. Any idea why this could be the reason?
afterInsertRow:function (rowid, aData){
alert('fire');
},
beforeSaveCell : function(rowid,celname,value,iRow,iCol){
alert('no fire');
return "new value";
},
beforeSubmitCell : function(rowid,celname,value,iRow,iCol){
alert('no fire2');
return "new value";
},
beforeEditCell : function(rowid,celname,value,iRow,iCol){
alert('no fire3');
return "new value";
},
--edit2--
This is the code I'm using for inline editing.
onSelectRow: function(row_id){
if(row_id != null) {
var date_str = jQuery('#grid').getCell(row_id, 'date_str');
//var sum = jQuery('#grid').getCell(row_id, 'sum');
var description = jQuery('#grid').getCell(row_id, 'description');
if(date_str != "Total"){
if(row_id !== last_selected_row) {
if(row_id == -99){
//thats the first click of the user after initial load of the grid
jQuery('#grid').jqGrid('saveRow',row_id)
.editRow(row_id, true,true,reload);
last_selected_row = row_id;
}
else{
//after user jumps from one cell to another using the mouse
jQuery('#grid').jqGrid('saveRow',last_selected_row,reload);
jQuery('#grid').jqGrid('restoreRow',last_selected_row);
last_selected_row = row_id;
}
} else {
jQuery('#grid').jqGrid('saveRow',row_id)
.editRow(row_id, true,true,reload);
last_selected_row=row_id;
}
}
}
},