datagrid中给字段添加链接

{title:‘单价‘,field:‘fPrice‘, width:60,align:‘right‘,formatter:
    function(value,rowData){
        if (rowData.quotationId!=‘‘&&rowData.quotationId!=undefined){
            var viewLink = ‘<a style=\"color:blue\" href="#" onclick="javascript:viewQuotationItem(‘+rowData.quotationId+‘)">‘+ commafy(value) +‘</a>‘;
            return viewLink;
        }
        return commafy(value);
    }
}

function viewQuotationItem(iquotationId){
    var link = ‘<%=request.getContextPath()%>/apps/quotation.do?method=edit&view=/apps/refquote/Quotation_view&iquotationId=‘+iquotationId;
    jQuery.layer({type: 2,shade: [0.5, ‘#000‘],fix: false,title: ‘查看报价信息‘,iframe: {src : link},area: [‘950px‘ , ‘400px‘]});
}

 

datagrid中给字段添加链接

上一篇:CoordinateLayout的实现原理


下一篇:0901