1
我使用jQuery Easyui Datagrid的Grails中加載這是我創造了GSP文件電網碼: -的jQuery easyui數據網格編輯器不使用Grails
<table class="easyui-datagrid"
data-options="fit:true,idField:'id',pageNmber:1,pageList:[25,50,75,100]" pagination="true" id="importGrid">
<thead>
<tr>
<th data-options="field:'firstName',sortable:true,width:15,nowrap:true" >First Name</th>
<th data-options="field:'lastName',sortable:true,width:25,nowrap:true" editor="{type:'validatebox',options:{required:true}}" >Last Name</th>
<th data-options="field: 'firstNameLastName',sortable:true,width:130,nowrap:true" >First Name Last Name</th>
<th data-options="field:'displayName',sortable:true,rowspan:2,width:80,nowrap:true">Display Name</th>
<th data-options="field:'relocation',sortable:true,width:130,nowrap:true">Relocation</th>
<th data-options="field:'proficiency',sortable:true,width:130,nowrap:true" editor="{
type:'combobox',
options:{
valueField:'rightid',
textField:'rightname',
data:aRights,
required:true
}
}">Proficiency</th>
<th data-options="field:'subProficiency',sortable:true,width:130,nowrap:true" editor='proficiencyEditor'>Sub Proficiency</th>
<th data-options="field:'uploadResume',sortable:true,width:130,nowrap:true,">Relocation</th>
</tr>
</thead>
</table>
我嘗試使用URL是指在控制器中的一個動作,但它不工作。所以使它與gsp工作,現在我正在使用一個js變量,我已經在同一個gsp中聲明。我有可變aRights這樣的: -
<script> var aRights = [{rightid: 'V', rightname: 'View Only'},
{rightid: 'E', rightname: 'Edit FPC'},
{rightid: 'A', rightname: 'Admin'},
{rightid: 'N', rightname: 'None'}
] ;
</script>
但編輯器是不可見的..
這是我使用的填充數據grid.This代碼的代碼在JS: -
$('#importGrid').datagrid({
url:'/'+productName+'/TestList/excelImport',
queryParams:{
list: hiddenMapForFields,
file:fileName
},
pageNumber: 1,
});
我是新來的Jquery easyui編輯。請讓我知道我錯了,並幫助我解決這個問題。
對http://www.jeasyui.com/demo/更多信息搜索主/ CRUD DataGrid – 2014-08-28 09:04:14
Thanks.Its在上面提到的更改之後爲我工作。 – Mahi 2014-08-28 11:17:33