Skip to content

Commit

Permalink
We need firdt to destroy group header before to show/hide column and …
Browse files Browse the repository at this point in the history
…the to restore it.
  • Loading branch information
tonytomov committed Oct 10, 2011
1 parent 3e776a5 commit 699d146
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/grid.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -2897,7 +2897,9 @@ $.jgrid.extend({
if (!$t.grid ) {return;}
if( typeof colname === 'string') {colname=[colname];}
show = show != "none" ? "" : "none";
var sw = show === "" ? true :false;
var sw = show === "" ? true :false,
gh = $t.p.groupHeader && (typeof $t.p.groupHeader === 'object' || $.isFunction($t.p.groupHeader) );
if(gh) { $($t).jqGrid('destroyGroupHeader', false); }
$(this.p.colModel).each(function(i) {
if ($.inArray(this.name,colname) !== -1 && this.hidden === sw) {
$("tr",$t.grid.hDiv).each(function(){
Expand All @@ -2916,8 +2918,7 @@ $.jgrid.extend({
if(fndh===true) {
$($t).jqGrid("setGridWidth",$t.p.shrinkToFit === true ? $t.p.tblwidth : $t.p.width );
}
if($t.p.groupHeader && (typeof $t.p.groupHeader === 'object' || $.isFunction($t.p.groupHeader) ) ) {
$($t).jqGrid('destroyGroupHeader', false);
if( gh ) {
$($t).jqGrid('setGroupHeaders',$t.p.groupHeader);
}
});
Expand Down

0 comments on commit 699d146

Please sign in to comment.