JQGrid自定义元素函数仅第一次触发

JQGrid自定义元素函数仅第一次触发,jqgrid,Jqgrid,我在jqgrid中为单选按钮使用自定义编辑类型。选择行并单击“编辑”后,第一次一切正常。但从第二次开始,它甚至没有调用custom_元素中提到的函数 我的jqgrid柱规格如下 {name: "StatusName", editable: true, edittype: "custom", editoptions: {custom_element: radioelement, custom_value: radiovalue}} 自定义元素函数为: function radioelement(

我在jqgrid中为单选按钮使用自定义编辑类型。选择行并单击“编辑”后,第一次一切正常。但从第二次开始,它甚至没有调用custom_元素中提到的函数

我的jqgrid柱规格如下

{name: "StatusName", editable: true, edittype: "custom", editoptions: {custom_element: radioelement, custom_value: radiovalue}}
自定义元素函数为:

function radioelement(value, options) {
        var receivedradio = '<input type="radio" name="status" value="Active"',
                breakline = '/>Active<br>',
                naradio = '<input type="radio" name="status" value="InActive"',
                endnaradio = '/>Inactive<br>';

        if (value === 'Active') {
            return "<span>" + receivedradio + ' checked="checked"' + breakline + naradio + endnaradio + "</span>";
        }
        if (value === 'InActive') {
            return "<span>" + receivedradio + breakline + naradio + ' checked="checked"' + endnaradio + "</span>";
        }
        return "<span>" + receivedradio + breakline + naradio + endnaradio + "</span>";
    };
function radiovalue(elem, operation, value) {
        if (operation === 'get') {
            return $(elem).val();
        } else if (operation === 'set') {
            if ($(elem).is(':checked') === false) {
                $(elem).filter('[value=' + value + ']').attr('checked', true);
            }
        }
    };

请帮我解决这个问题

我也有同样的问题,你是如何解决的?