jqgrid怎么对某个字段
发布网友
发布时间:2022-04-24 09:34
我来回答
共1个回答
热心网友
时间:2022-04-23 10:22
<div class="main" style="margin-left:400px;">
<table id="list_grid" class="grid"></table>
<div id="list_pager"></div>
</div>
jqgrid部分:
$("#stocklist_grid").jqGrid({
url:'ajax.php?action=get_stock_list',
datatype: "json",
mtype: "POST",
colNames:['ID', 'Code', 'Name', 'Mark'],
colModel:[
{name:'id',index:'id',width:60,align:'center'},
{name:'code',index:'code', wdith: 80, align:'center', editable:true, edittype:'textarea', editoptions:{rows:'10'}},
{name:'name',index:'name', width: 80, align:'center'},
{name:'mark',index:'mark', width: 220, align:'left', formatter:function(cellvalue, options, rowObj){
return "<span id='"+rowObj.id+"' class='mark_data' style='display:block; width:100%; cursor:pointer;'>"+cellvalue+"</span>";
}}
],