{header:'数量',dataIndex:'sl'}, 
{header:'价格',dataIndex:'jg',sortable:true},怎么合在一起写成  数量+价格
header:'数量+价格',dataIndex:'sl'+'jg',sortable:true},

解决方案 »

  1.   

    {
    header:"发送日期",
    tooltip:"发送日期",
    dataIndex:"iymd",

            sortable:true,
            renderer:renderDescn  
    }
    function renderDescn(value, cellmeta, record, rowIndex, columnIndex, store){
            if(record.data["ReleaseFlag"] ==0)
                return "<font color='red'>"+value+"</font>";
               else
                return value;
                    return record.data["sl"]+record.data["jg"];//sl 和jg是你JSON的字段
    }
    后面这个方法就是处理你要的结果 record是你的JSON返回的那行结果
      

  2.   


    不能这样写。一列只能对应一个dataIndex
    可以像1楼一样加一列renderer:function(a,b,c,d,e){
    /*你的操作*/
    }
      

  3.   

    function renderDescn(value, cellmeta, record, rowIndex, columnIndex, store){  return record.data["sl"]+record.data["jg"];//sl 和jg是你JSON的字段
    }
    ---都是我的错  原来我把我的例子多写了给了  呵呵  这个函数就只要返回 数据这一样  前面那IF 是我的代码 忘记删除了  不好意思