function collectHeaderSpans(oColumn, index, aCols) {
			var colSpan = ColumnUtils.getHeaderSpan(oColumn, iRow),
				iColIndex;

			if (nSpan < 1) {
				if (colSpan > 1) {
					// In case when a user makes some of the underlying columns invisible, adjust colspan
					iColIndex = oColumn.getIndex();
					colSpan = aCols.slice(index + 1, index + colSpan).reduce(function(span, column){
						return column.getIndex() - iColIndex < colSpan ? span + 1 : span;
					}, 1);
				}

				oColumn._nSpan = nSpan = colSpan;
				iLastVisibleCol = index;
			} else {
				//Render column header but this is invisible because of the previous span
				oColumn._nSpan = 0;
			}
			nSpan--;
		}
// collect header spans and find the last visible column header
collect header spans and find the last visible column header
collect header spans and find the last visible column header
function collectHeaderSpans(oColumn, index, aCols) {
			var colSpan = ColumnUtils.getHeaderSpan(oColumn, iRow),
				iColIndex;
			if (nSpan < 1) {
				if (colSpan > 1) {
					iColIndex = oColumn.getIndex();
					colSpan = aCols.slice(index + 1, index + colSpan).reduce(function(span, column){
						return column.getIndex() - iColIndex < colSpan ? span + 1 : span;
					}, 1);
				}
				oColumn._nSpan = nSpan = colSpan;
				iLastVisibleCol = index;
			} else {
				oColumn._nSpan = 0;
			}
			nSpan--;
		}
function collectHeaderSpans ( oColumn , index , aCols ) { var colSpan = ColumnUtils . getHeaderSpan ( oColumn , iRow ) , iColIndex ; if ( nSpan < 1 ) { if ( colSpan > 1 ) { iColIndex = oColumn . getIndex ( ) ; colSpan = aCols . slice ( index + 1 , index + colSpan ) . reduce ( function ( span , column ) { return column . getIndex ( ) - iColIndex < colSpan ? span + 1 : span ; } , 1 ) ; } oColumn . _nSpan = nSpan = colSpan ; iLastVisibleCol = index ; } else { oColumn . _nSpan = 0 ; } nSpan -- ; }
collect header spans and find the last visible column header
collect header spans and find the last visible column header
// In case when a user makes some of the underlying columns invisible, adjust colspan //Render column header but this is invisible because of the previous span