jQuery MiniUI
标题:
editor URI的错误,希望能改正
[打印本页]
作者:
qingwuzhu
时间:
2017-6-7 17:10:47
标题:
editor URI的错误,希望能改正
<
div
id
="datagrid1"
class
="mini-datagrid"
allowCellEdit
="true"
showPager
="false"
allowCellSelect
="true"
editNextOnEnterKey
="true"
editNextRowCell
="true"
oncellbeginedit
="OnCellBeginEdit"
>
<
div
property
="columns"
>
<
div
field
="bmpHeadName"
headerAlign
="center"
>
标题
</
div
>
<
div
field
="tpPos"
type
="comboboxcolumn"
width
="80"
headerAlign
="center"
模板
<
input
property
="editor"
class
="mini-combobox"
style
="
width
:
100
%;
"
/>
</
div
>
</
div
>
</
div
>
function loadHeadGrid(){
var tcode = mini.get("tp_id").getValue();
$.ajax({
url:'${basePath}/ocr/rprecog/listRpHead?id=${parameter.id}&tp_code='+tcode,
type: 'POST',
data: '',
cache: false,
contentType: 'application/json',
success: function (text) {
var url="${basePath}/ocr/tpcolumn/listAllToIdText?tp_code="+tcode;
dpGrid.columns[1].editor.url = url;
dpGrid.setData(text);
}
});
datagrid1是动态加载数据,
loadHeadGrid是动态加载数据JS,
每次只有第一次才会调用
listAllToIdText方法去后台取数据,第二次不会调用了。不知道为什么。
作者:
felt
时间:
2017-6-7 17:25:26
type=comboboxcolumn的列需要是固定数据,只加载一次
如果你的下拉数据不固定,请不要使用type="comboboxcolumn",使用field+displayField
http://www.miniui.com/demo/#src=datagrid/celllinkedit.html
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2