Js DataGrid a column value is calculated from the first two columns Found

function loadDatagrid(){
		$('#road').datagrid({
		fit:true,
		metch:'post',
		url:'GetRJGYLD.action',
		pagination:false,
		singleSelect:true,
		fitColumns: true,
		scrollbarSize:0,
		columns:[[
			 //{field:'ck',checkbox:'true'}, 
			{field:'tbh',title:'图斑号',width:75,align:'center'},
			{field:'tbm',title:'图斑名',width:75,align:'center'},
			{field:'lhfgmjms',title:'绿化覆盖面积',width:75,align:'right'},
			{field:'zmjms',title:'总面积',width:75,align:'right'},
			{field:'lhfglms',title:'绿化覆盖率',width:75,align:'right',formatter: function(value,row,index){return (Math.round(row.lhfgmjms/row.zmjms* 10000) / 100.00 + "%"); }},
		]],

The green coverage area and the total area green coverage rate obtained

{field:'lhfglms',title:'绿化覆盖率',width:75,align:'right',formatter: function(value,row,index){return (Math.round(row.lhfgmjms/row.zmjms* 10000) / 100.00 + "%"); }},

 

Guess you like

Origin blog.csdn.net/qq_40216244/article/details/82559565