如何从jqgrid添加表单中删除取消按钮?

如何从jqgrid添加表单中删除取消按钮?,jqgrid,Jqgrid,jqgrid添加对话框有两个按钮(提交和取消)。单击“取消”按钮时将显示一条消息。该消息框有3个按钮(是、否和取消)。现在我想删除取消按钮。有没有可能 对不起,我的英语不好。 多谢各位 jqgrid的示例编码 <sjg:grid id="gridtable" caption="Customer List" dataType="json" href="%{remoteurl}" pager="true" gridModel="customerList" rowNum="10" autowid

jqgrid添加对话框有两个按钮(提交和取消)。单击“取消”按钮时将显示一条消息。该消息框有3个按钮(是、否和取消)。现在我想删除取消按钮。有没有可能

对不起,我的英语不好。 多谢各位

jqgrid的示例编码

<sjg:grid id="gridtable"
caption="Customer List"
dataType="json"
href="%{remoteurl}"
pager="true"
gridModel="customerList"
rowNum="10"
autowidth="true"
editurl="%{editurl}"
editinline="false"
navigator="true"
navigatorAdd="true"
navigatorAddOptions="{
        viewPagerButtons: false,
        recreateForm: true,
        checkOnUpdate: true,
        closeAfterAdd: true,
        height: 275,
        width: 600,
        draggable: false,
        resizable: false
    }"
navigatorDelete="true"
navigatorEdit="true"
navigatorRefresh="true"
navigatorSearch="true"
navigatorEditOptions="{
        viewPagerButtons: false,
        recreateForm: true,
        checkOnUpdate: true,
        closeAfterEdit: true,
        height: 275,
        width: 600,
        draggable: false,
        resizeable: false
    }"
navigatorDeleteOptions="{ checkOnUpdate: true}"
navigatorViewOptions="{
        viewPagerButtons: false,
        recreateForm: true,
        checkOnUpdate: true,
        height: 225,
        width: 620,
        draggable: false,
        resizeable: false
    }"
navigatorSearchOptions="{
        sopt:['eq','ne','lt','gt','in','ni','cn','nc'],
        closeAfterSearch: true
    }"
navigatorView="true"
rownumbers="true"
rowList="10,20,30"
viewrecords="true"              

非常感谢你

这里我指定了取消按钮

如何删除此取消按钮


我只需要“是”和“否”按钮。

使用网格API我不知道如何实现这一点,但是,使用jquery可以通过以下方式隐藏此按钮: $(“#gridtable#cNew).css({'display':'none');


“#cNew”是该按钮的id,或者您可以通过右键单击该按钮并选择mozila webbrowser中的inspect element来获取Cancel按钮的id,或者使用firebug获取该按钮的id,然后用#cNew替换该id。

我认为您可以将其应用于每个表单的添加、编辑等

隐藏按钮取消

onInitializeForm: function($form) {
$form.parent().find('#cData').hide();
}
或者如果你想隐藏按钮提交

beforeShowForm: function ($form) {
$form.parent().find('#sData').hide();
},

单击“取消”时,您使用什么来显示消息?您能提供一些代码吗?谢谢您的回答,先生。我的jqgrid示例代码