如何更改jqgrid中的编辑表单标题?

时间:2013-04-04 12:03:29

标签: jqgrid

enter image description here

如何将标题“编辑记录”更改为“编辑项目记录”?

谢谢。

3 个答案:

答案 0 :(得分:5)

您可以使用editGridRoweditCaptionaddCaption选项。选项的默认值在grid.locale-en.js

中定义

答案 1 :(得分:1)

动态:

beforeShowForm: function (formid) {

var mytitle = "My text to show"; // or whatever you want

$(".ui-jqdialog-title","#edithd"+mygridid).html(mytitle);

}

作为设置的一部分:

editGridRow(id,{editCaption: 'Edit caption', ...

答案 2 :(得分:0)

使用 addCaption 属性更改 addForm 的标题,并使用 editCaption 属性更改 editForm 的标题。< / p>

jQuery('#gridId').jqGrid('navGrid', '#pagerId',
{   //navbar options
            edit: true,
            editicon: 'fa fa-pencil blue',
            add: false,
            addicon: 'fa fa-plus-circle purple',
            del: false,
            delicon: 'fa fa-trash-o red',
            search: false,
            searchicon: 'fa fa-search orange',
            refresh: true,
            refreshicon: 'fa fa-refresh green',
            view: false,
            viewicon: 'fa fa-search-plus grey'
        },
        {
            editCaption:'Edit Project Record'
        }, //Edit
        {

        }, //Add
          {
addCaption:'Add Project Record'
          },
           {},
            {});
相关问题