开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜