htmlXGridObject.prototype.enableStableSorting=function(mode){this._sst=convertStringToBoolean(mode);this.rowsCol.stablesort=function(cmp){var size=this.length-1;for (var i=0;i0){var temp=this[j];this[j]=this[j+1];this[j+1]=temp};size--}}};dhtmlXGridObject.prototype.enableKeyboardSupport=function(mode){this._htkebl=!convertStringToBoolean(mode)};dhtmlXGridObject.prototype.enableContextMenu=function(menu){this._ctmndx=menu};dhtmlXGridObject.prototype.setOnBeforeContextMenu=function(func){this.attachEvent("onBeforeContextMenu",func)};dhtmlXGridObject.prototype.setOnRightClick=function(func){this.attachEvent("onRightClick",func)};dhtmlXGridObject.prototype.setScrollbarWidthCorrection=function(width){this._scrFix=parseInt(width)};dhtmlXGridObject.prototype.enableTooltips=function(list){this._enbTts=list.split(",");for (var i=0;i-1)pfix=nmask.length-pfix-1;var dfix=nmask.indexOf(",");if (dfix>-1)dfix=nmask.length-pfix-2-dfix;p_sep=p_sep||".";d_sep=d_sep||",";var pref=mask.split(nmask)[0];var postf=mask.split(nmask)[1];this._maskArr[cInd]=[pfix,dfix,pref,postf,p_sep,d_sep]};dhtmlXGridObject.prototype._aplNFb=function(data,ind){var a=this._maskArr[ind];if (!a)return data;var ndata=parseFloat(data.toString().replace(/[^0-9]*/g,""));if (data.toString().substr(0,1)=="-") ndata=ndata*-1;if (a[0]>0)ndata=ndata/Math.pow(10,a[0]);return ndata};dhtmlXGridObject.prototype._aplNF=function(data,ind){var a=this._maskArr[ind];if (!a)return data;var c=(parseFloat(data)<0?"-":"")+a[2];data = Math.abs(Math.round(parseFloat(data)*Math.pow(10,a[0]>0?a[0]:0))).toString();data=(data.length0)for (var j=(a[0]>0?0:1)+a[0]+a[1];j0){var a_list="";var b_list="";var c_list="";var d_list="";var e_list="";var f_list="";var g_list="";var f_arr=[];for (var i=0;i0){if (!this.UserData["gridglobaluserdata"])this.UserData["gridglobaluserdata"] = new Hashtable();for(var j=0;j0){if (!this.UserData[rId])this.UserData[rId] = new Hashtable();for(var j=0;j0){this.changePage(this.currentPage) };if ((r)&&(this._checkSCL)) for(var i=0;i]*>/gi,""));return true};dhtmlXGridObject.prototype.enableCellWidthCorrection=function(size){if (_isFF)this._wcorr=parseInt(size)};dhtmlXGridObject.prototype.getAllRowIds = function(separator){var ar = new Array(0) var z=this.getRowsNum();for(i=0;i=0){this.rowsBuffer[0]._dhx_removeAt(ind) this.rowsBuffer[1]._dhx_removeAt(ind) }};this.rowsAr[row_id] = null};for (var i=0;i1)){if (r._childIndexes)var j=r._childIndexes[col_ind];else{var j=col_ind;r._childIndexes=new Array();for (var z=0;zm)m=z};m+=20;this._setColumnSizeR(cInd,m);this._notresize=false;this.setSizes()};dhtmlXGridObject.prototype.detachHeader = function(index,hdr){hdr=hdr||this.hdr;var row=hdr.rows[index+1];if (row)row.parentNode.removeChild(row);this.setSizes()};dhtmlXGridObject.prototype.detachFooter = function(index){this.detachHeader(index,this.ftr)};dhtmlXGridObject.prototype.attachHeader = function(values,style,_type){if (typeof(values)=="string") values=this._eSplit(values);if (typeof(style)=="string") style=style.split(this.delim);_type=_type||"_aHead";if (this.hdr.rows.length){if (values)this._createHRow([values,style],this[(_type=="_aHead")?"hdr":"ftr"]);else if (this[_type])for (var i=0;i1)){var pind=parent.rows.length-2;var found=false;var pz=null;while(!found){var pz=parent.rows[pind];for (var j=0;j";else w.innerHTML=data[0][i];if ((data[0][i]||"").indexOf("#")!=-1){var t=data[0][i].match(/(^|{)#([^}]+)(}|$)/);if (t){var tn="_in_header_"+t[2];if (this[tn])this[tn]((this.forceDivInHeader?w.firstChild:w),i,data[0][i].split(t[0]))}};if (st1)w.style.cssText = st1[i];z.appendChild(w)};var self=parent;if (_isKHTML){if (parent._kTimer)window.clearTimeout(parent._kTimer);parent._kTimer=window.setTimeout(function(){parent.rows[1].style.display='none';window.setTimeout(function(){parent.rows[1].style.display=''},1)},500)}};dhtmlXGridObject.prototype.attachFooter = function(values,style){this.attachHeader(values,style,"_aFoot")};dhtmlXGridObject.prototype.setCellExcellType = function(rowId,cellIndex,type){this.changeCellType(this.rowsAr[rowId],cellIndex,type)};dhtmlXGridObject.prototype.changeCellType=function(r,ind,type){type=type||this.cellType[ind];var z=this.cells3(r,ind);var v=z.getValue();z.cell._cellType=type;var z=this.cells3(r,ind);z.setValue(v)};dhtmlXGridObject.prototype.setRowExcellType = function(rowId,type){var z=this.rowsAr[rowId];for (var i=0;i