diff --git a/dist/modules/grid.base.js b/dist/modules/grid.base.js index 5a7681909..39d3eed81 100644 --- a/dist/modules/grid.base.js +++ b/dist/modules/grid.base.js @@ -2661,6 +2661,16 @@ isNoFilterValueExist = true; } } + } else if (Array.isArray(value)) { + for (i = 0 ; i < value.length ; i++) { + optionInfos.push({ + value: value[i][0], + innerHtml: value[i][1], + selectValue: $.trim(value[i][0]), + selectText: $.trim(value[i][1]), + selected: false + }); + } } else if (typeof value === "object") { for (key in value) { if (value.hasOwnProperty(key)) { diff --git a/dist/modules/grid.custom.js b/dist/modules/grid.custom.js index 399579eb8..1ca285342 100644 --- a/dist/modules/grid.custom.js +++ b/dist/modules/grid.custom.js @@ -1322,6 +1322,7 @@ // The text will be over the cVisibleColumns columns $colHeader = $("") .addClass(thClasses) + .addClass(cghi.className) .html(titleText || " "); if (cVisibleColumns > 0) { $colHeader.attr("colspan", String(cVisibleColumns)); diff --git a/js/grid.base.js b/js/grid.base.js index 5a7681909..39d3eed81 100644 --- a/js/grid.base.js +++ b/js/grid.base.js @@ -2661,6 +2661,16 @@ isNoFilterValueExist = true; } } + } else if (Array.isArray(value)) { + for (i = 0 ; i < value.length ; i++) { + optionInfos.push({ + value: value[i][0], + innerHtml: value[i][1], + selectValue: $.trim(value[i][0]), + selectText: $.trim(value[i][1]), + selected: false + }); + } } else if (typeof value === "object") { for (key in value) { if (value.hasOwnProperty(key)) { diff --git a/js/grid.custom.js b/js/grid.custom.js index 399579eb8..092d73f2b 100644 --- a/js/grid.custom.js +++ b/js/grid.custom.js @@ -1232,6 +1232,7 @@ var $t = this, i, l, $th, $resizing, grid = $t.grid, cm = $t.p.colModel, hc, thead = $("table.ui-jqgrid-htable thead", grid.hDiv); if (!grid) { return; } + delete this.grid.groupHeaders; $($t).off(".setGroupHeaders"); var $tr = $("", { role: "row" }).addClass("ui-jqgrid-labels"); @@ -1294,6 +1295,7 @@ $(ts).prepend($thead); $tr = $("", { role: "row" }).addClass("ui-jqgrid-labels jqg-third-row-header"); + this.grid.groupHeaders = []; for (i = 0; i < cml; i++) { th = ths[i].el; $th = $(th); @@ -1322,6 +1324,7 @@ // The text will be over the cVisibleColumns columns $colHeader = $("") .addClass(thClasses) + .addClass(cghi.className) .html(titleText || " "); if (cVisibleColumns > 0) { $colHeader.attr("colspan", String(cVisibleColumns)); @@ -1336,6 +1339,12 @@ $th.before($colHeader); // insert new column header before the current $tr.append(th); // move the current header in the next row + this.grid.groupHeaders.push({ + el: $colHeader[0], + numberOfColumns: cghi.numberOfColumns, + numberOfVisibleColumns: cVisibleColumns, + title: cghi.titleText + }); // set the counter of headers which will be moved in the next row skip = numberOfColumns - 1; @@ -1356,6 +1365,12 @@ $tr.append(th); skip--; } + this.grid.groupHeaders.push({ + el: th, + numberOfColumns: 1, + numberOfVisibleColumns: 0, + title: '' + }); } } $theadInTable = $(ts).children("thead");