在jqgrid中使用内联Nav [英] Use of inline Nav in jqgrid
问题描述
我正在使用Jqgrid.我在其中使用inine导航添加新行.我的内联导航代码
I am use Jqgrid. In which i use inine nav for add new rows. My Inline nav code
jQuery("#list").jqGrid('inlineNav','#Pager',
{
editParams : {
extraparam : {
extraParamId : function() {
return allExtraId;
}
}
}
});
所以我的问题是,当我使用inlineNav时,是否需要此代码navGrid
So my Question is that when i am use inlineNav so this code navGrid is require or not
jQuery("#list").jqGrid('navGrid','#Pager', {
edit : false,
add : false
});
请回复....在此先感谢.
Please Reply.... Thanks in Advance..
推荐答案
在调用 inlineNav
之前,确实需要调用 navGrid
.原因是寻呼机默认情况下仅创建三个部分:左,中和右.这些部分作为寻呼机中表格行的< td>
元素.例如,如果您不调用 navGrid
,您将在寻呼机的左侧留空,如下所示:
The call of navGrid
is really required before calling of inlineNav
. The reason is that the pager creates per default only three parts: left, center and right. The parts as as <td>
elements of the row of table in the pager. For example if you don't call navGrid
you will have empty left part of the pager like below:
<td align="left" id="pager_left"></td>
例如,您以
形式调用 navGrid
$("#grid").jqGrid("navGrid", "#pager",
{add: false, edit: false, del: false, search: false, refresh: false});
寻呼机的左侧部分将更改为
the left part of the pager will be changed to
<td align="left" id="pager_left">
<table class="ui-pg-table navtable"
style="float: left; table-layout: auto;"
border="0" cellspacing="0" cellpadding="0">
<tbody><tr></tr></tbody>
</table>
</td>
inlineNav
的当前实现仅使用navButtonAdd 将必须在之前创建的其他按钮添加到导航器.您如何从该行看到代码的方法 navButtonAdd
使用 $(.navtable","#pager")
在寻呼机内部找到导航器表.仅在找到导航器时,方法 navButtonAdd
会在其中添加其他按钮.
The current implementation of inlineNav
just uses navButtonAdd to add additional buttons to the navigator which must be created before. How you will see from the line of code the method navButtonAdd
uses $(".navtable", "#pager")
to find the navigator table inside of the pager. Only if the navigator will be found the method navButtonAdd
add additional buttons inside of it.
因此,您真的需要先在呼叫器中创建导航栏,然后再调用 inlineNav
.
So you really need first create the navigator bar in the pager before you call inlineNav
.
这篇关于在jqgrid中使用内联Nav的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!