在上回答,以便能够进入jqgrid高级搜索窗口,说明如何进入jqgrid高级搜索方log和其他钥匙。
在点击之后 添加组、添加次行、删除规则或删除高级搜索方言录和其他关键词组的纽顿仍然被忽视。 如何把重点放在添加要素或删除其余要素之后,以便能够进入和其他关键因素?
在上回答,以便能够进入jqgrid高级搜索窗口,说明如何进入jqgrid高级搜索方log和其他钥匙。
在点击之后 添加组、添加次行、删除规则或删除高级搜索方言录和其他关键词组的纽顿仍然被忽视。 如何把重点放在添加要素或删除其余要素之后,以便能够进入和其他关键因素?
The current edition of the High searching dialog (see definition of jqFilter
in the grid.filter.js
) recreate all control of the dialog on change of person. See the Code of reDraw , 查询
this.reDraw = function() {
$("table.group:first",this).remove();
var t = this.createTableForGroup(p.filter, null);
$(this).append(t);
if($.isFunction(this.p.afterRedraw) ) {
this.p.afterRedraw.call(this, this.p);
}
};
如何看待第1行的<代码>$(“table.group:first”,this).remove();删除所有过滤器的内容。 目前的重点将失去,我们有你描述的问题。
我建议确定<代码>reDraw。 使用文件。 积极参与 最初在互联网探索者(至少在IE4)中引入的元件,现在所有网络浏览器都支持这一要素,因为它是超文本5的一部分(见here)。 最初重点内容将被毁,以后无法重点处理。 因此,我建议删除该元素的元件名称,并将其分为几类(如<编码>输入.add-group或input.add-rule.ui-add-add<<>/code>),并找到该元件在探测方言上的位置。 后来,在将重新计算辩证元件后,我们用同样的指数把重点放在元件上。
I suggest 页: 1 change the code of reDraw
页: 1 the following
this.reDraw = function() {
var activeElement = document.activeElement, selec页: 1r, $dialog, activeIndex = -1, $newElem, $but页: 1ns,
but页: 1nClass,
getBut页: 1nClass = function (classNames) {
var arClasses = [ add-group , add-rule , delete-group , delete-rule ], i, n, className;
for (i = 0, n = classNames.length; i < n; i++) {
className = classNames[i];
if ($.inArray(className, arClasses) >= 0) {
return className;
}
}
return null;
};
if (activeElement) {
selec页: 1r = activeElement.nodeName.页: 1LowerCase();
but页: 1nClass = getBut页: 1nClass(activeElement.className.split( ));
if (but页: 1nClass !== null) {
selec页: 1r += . + but页: 1nClass;
if (selec页: 1r === "input.delete-rule") {
$but页: 1ns = $(activeElement).closest( table.group )
.find( input.add-rule,input.delete-rule );
activeIndex = $but页: 1ns.index(activeElement);
if (activeIndex > 0) {
// find the previous "add-rule" but页: 1n
while (activeIndex--) {
$newElem = $($but页: 1ns[activeIndex]);
if ($newElem.hasClass("add-rule")) {
activeElement = $newElem[0];
selec页: 1r = activeElement.nodeName.页: 1LowerCase() + "." +
getBut页: 1nClass(activeElement.className.split( ));
break;
}
}
}
} else if (selec页: 1r === "input.delete-group") {
// change focus 页: 1 "Add Rule" of the parent group
$newElem = $(activeElement).closest( table.group )
.parent()
.closest( table.group )
.find( input.add-rule );
if ($newElem.length > 1) {
activeElement = $newElem[$newElem.length-2];
selec页: 1r = activeElement.nodeName.页: 1LowerCase() + "." +
getBut页: 1nClass(activeElement.className.split( ));
}
}
$dialog = $(activeElement).closest(".ui-jqdialog");
activeIndex = $dialog.find(selec页: 1r).index(activeElement);
}
}
$("table.group:first",this).remove();
$(this).append(this.createTableForGroup(this.p.filter, null));
if($.isFunction(this.p.afterRedraw) ) {
this.p.afterRedraw.call(this, this.p);
}
if (activeElement && activeIndex >=0) {
$newElem = $dialog.find(selec页: 1r + ":eq(" + activeIndex + ")");
if ($newElem.length>0) {
$newElem.focus();
} else {
$dialog.find("input.add-rule:first").focus();
}
}
};
如可在 下一次 demo。 在要求“Add子”或“Add Rule”纽扣后,寻找迪亚洛的重点保持不变。 我把它放在前一个增长集团的“补充规则”的 but子上,如果是紧迫的“替代集团”。
rel=“nofollow noretinger”> 另有1个标准使用丁顿语和丁顿语文本的j Query UI风格(见 回答:。 在点击“Delete”(规则或群体)后,I页: 1n试图把重点放在以前的“Add Rule”纽顿上,因为把重点放在另一个“Delete”(规则或群体)纽顿。
此外,在标准一的使用中
afterShowSearch: function ($form) {
var $lastInput = $form.find(".input-elm:last");
if ($lastInput.length > 0) {
$lastInput.focus();
}
}
因为在开始方言时,对最后一个投入领域确定初步重点似乎是有意义的。
<>UPDATED: 我认为,进一步重视目前被点击的纽芬兰语“Add子”、“Add Rule”或“Delete小组”。 在这种情形下,人们首先点击了某些 but子,然后想继续与键盘合作。 因此,我建议修改。 页: 1
inputAddSubgroup.bind( click ,function() {
页: 1
inputAddSubgroup.bind( click ,function(e) {
$(e.target).focus();
To change the line
inputAddRule.bind( click ,function() {
页: 1
inputAddRule.bind( click ,function(e) {
$(e.target).focus();
and the line
inputDeleteGroup.bind( click ,function() {
页: 1
inputDeleteGroup.bind( click ,function(e) {
$(e.target).focus();
and the line
ruleDeleteInput.bind( click ,function() {
页: 1
ruleDeleteInput.bind( click ,function(e) {
$(e.target).focus();
It is possible to use the getRowData method to retrieve the current of a cell but this retrieves the current cell content rather than the original data before it went through the formatter. How do I ...
How does one programmatically select the top row of a JQGrid. I want to have the top row already selected when it is opened on the page. My grid is sorted by a descriptive column so the first row s id ...
How can I insert alternating row background color in jqGrid?
How to set blank instead of NaN in jqGrid cells ? Using formatter ? Is there an example?
Please, can anyone tell me how to use jqGrid? I want to do edit, add & delete functionality. Also I want to show an image in the grid Please tell me, what can I do, and how can I do?
I m using the column reordering feature in jqGrid $grid = jQuery("#list").jqGrid({ sortable:true, ... }); Is there an event that fires after columns are re-ordered? If there is, I can t see ...
Can you get lines of text to wrap in JqGrid? I have had a look round but i can t find anything.
I d prefer using Table and td instead of JqGrid but i like JqGrid styles. has anyone used jqgrid style for usual Grid of asp.net MVC(i mean Table and td) before?