jqgrid - empty cell undefined problem in IE
Im using the following code for formatting date in jqgrid for a cell.
function formateDate(cellvalue, options, rowObject) {
if(cellvalue!=undefined)
return changeDateFormat(cellvalue);
else
return ' ';}
and used formatter:formateDate
as option for colmodel.
In firefox for empty cells it is showing empty valule b开发者_Go百科ut in IE it is showing undefined//undefined
as its value.
How to remove this value and place empty space in that cell.??
Thanks, Sandeep
try using typeof :
function formateDate(cellvalue, options, rowObject) {
if(typeof(cellvalue)!='undefined')
return changeDateFormat(cellvalue);
else
return ' ';}
精彩评论