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

标签 jqgrid

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"              

>

非常感谢。

这里我指定取消按钮 enter image description here

如何删除这个取消按钮?

我只需要"is"和“否”按钮。

最佳答案

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

'#cNew' 是该按钮的 id,或者您可以通过右键单击该按钮并在 mozila webbrowser 中选择检查元素来获取“取消”按钮的 id,或者使用 firebug 获取该按钮的 id,然后将该 id 替换为 #cNew .

关于jqgrid - 如何从 jqgrid 添加表单中删除取消按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15428925/

相关文章:

asp.net - jqgrid x pager 的第 1 页

javascript - JQGrid 空网格,没有导航或编辑图标

templates - jqgrid:如何在组合框中定义过滤器预设/模板?

jqgrid - 在 jqGrid 中请求第 0 页

javascript - JqG​​rid 分页器问题 - 总页数和记录显示不正确

json - JQgrid总金额行

javascript - 在 jqGrid 中设置多个子网格的样式,使它们水平对齐。

jquery - 是否存在使用 jqGrid 按需分组的解决方案?

javascript - jqGrid : exporting 'formatted' data

jquery - 如何使用适当的事件初始化 jqGrid 以进行行重新排序(可排序)