小编Chr*_*ieu的帖子

JQGrid Edittype:使用dataurl'select'返回<select>,<optgroup>不保存选择值

我有一个带有edittype的JQGrid列:'选择'使用dataUrl返回一个包含不同帐户组的组的帐户列表.

我的问题:保存行时,没有值传递给我的Select列的editurl.如果我删除'sa值传递给我的Select列的editurl.

描述:对于我的列数据,我返回帐户名称而不是值,因此当网格加载时,将显示名称.

编辑一行(在线编辑)时,将调用dataUrl并显示选择列表,并为行数据选择我的帐户.

然后,我从"选择"列表中选择一个新帐户,然后按Enter键保存.选定的帐户值不会传递给列的editurl函数.如果我删除了来自Account的值,则传递给editurl函数.

我不确定我是否做错了,即没有设置网格参数,

希望你能帮助我.

提前致谢,

克里斯

我的网格代码:

$(document).ready(
function () {
    var lastSelection;
    var grid = jQuery("#BankTransactions");
    grid.jqGrid({
        url: '/DropDown/GridData/',
        datatype: 'json',
        mtype: 'GET',
        colNames: ['TransactionLineId', 'TransactionId', 'BankTransactionId', 'Number', 'Amount', 'Category'],
        colModel: [
                    { name: 'transactionLineId', index: 'transactionLineId', editable: true, editrules: { edithidden: true }, hidden: true, width: 40, align: 'left' },
                    { name: 'transactionId', index: 'transactionId', editable: true, editrules: { edithidden: true }, hidden: true, width: 40, align: 'left' },
                    { name: 'bankTransactionId', index: 'bankTransactionId', editable: …
Run Code Online (Sandbox Code Playgroud)

jqgrid optgroup

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

jqgrid ×1

optgroup ×1