开发者

jqgrid - empty cell undefined problem in IE

开发者 https://www.devze.com 2023-03-06 16:42 出处:网络
Im using the following code for formatting date in jqgrid for a cell. function formateDate(cellvalue, options, rowObject) {

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 ' ';}
0

精彩评论

暂无评论...
验证码 换一张
取 消