if(!nexacro.Grid){nexacro.GridDragEventInfo=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t,_u,_v,_w,_x,_y,_z){nexacro.DragEventInfo.call(this,_a,_b||"ongriddrag",_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r);this.cell=_s;this.col=_t;this.row=_y;this.subrow=_z;this.pivotindex=_x;this.mergecell=_u;this.mergecol=_v;this.mergerow=_w;};var _pGridDragEventInfo=nexacro._createPrototype(nexacro.DragEventInfo,nexacro.GridDragEventInfo);nexacro.GridDragEventInfo.prototype=_pGridDragEventInfo;_pGridDragEventInfo._type_name="GridDragEvent";delete _pGridDragEventInfo;nexacro.GridClickEventInfo=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t,_u,_v){nexacro.ClickEventInfo.call(this,_a,_b||"ongridclick",_m,_n,_o,_p,_q,_r,_s,_t,_u,_v);this.cell=_h;this.col=_i;this.row=_j;this.subrow=_k;this.pivotindex=_l;this.oldcell=_c;this.oldcol=_d;this.oldrow=_e;this.oldsubrow=_f;this.oldpivotindex=_g;};var _pGridClickEventInfo=nexacro._createPrototype(nexacro.ClickEventInfo,nexacro.GridClickEventInfo);nexacro.GridClickEventInfo.prototype=_pGridClickEventInfo;_pGridClickEventInfo._type_name="GridClickEvent";_pGridClickEventInfo._is_event=true;delete _pGridClickEventInfo;nexacro.GridEditEventInfo=function(_a,_b,_c,_d,_e,_f,_g,_h){this.id=this.eventid=_b||"ongridedit";this.fromobject=this.fromreferenceobject=_a;this.cell=_c;this.col=_d;this.row=_f;this.subrow=_g;this.pivotindex=_e;this.value=_h;};var _pGridEditEventInfo=nexacro._createPrototype(nexacro.Event,nexacro.GridEditEventInfo);nexacro.GridEditEventInfo.prototype=_pGridEditEventInfo;_pGridEditEventInfo._type_name="GridEditEvent";delete _pGridEditEventInfo;nexacro.GridTextChangeEventInfo=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){this.id=this.eventid=_b||"ontextchange";this.fromobject=this.fromreferenceobject=_a;this.cell=_c;this.chartext=_d;this.col=_e;this.pivotindex=_f;this.postimetext=_g;this.posttext=_h;this.preimetext=_i;this.pretext=_j;this.row=_k;this.subrow=_l;};var _pGridTextChangeEventInfo=nexacro._createPrototype(nexacro.Event,nexacro.GridTextChangeEventInfo);nexacro.GridTextChangeEventInfo.prototype=_pGridTextChangeEventInfo;_pGridTextChangeEventInfo._type_name="GridTextChangeEvent";_pGridTextChangeEventInfo.set_chartext=function(_a){this.chartext=_a;};_pGridTextChangeEventInfo.set_postimetext=function(_a){this.postimetext=_a;};delete _pGridTextChangeEventInfo;nexacro.GridTextChangedEventInfo=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){this.id=this.eventid=_b||"ontextchanged";this.fromobject=this.fromreferenceobject=_a;this.cell=_c;this.col=_d;this.pivotindex=_e;this.posttext=_f;this.pretext=_g;this.row=_h;this.subrow=_i;};var _pGridTextChangedEventInfo=nexacro._createPrototype(nexacro.Event,nexacro.GridTextChangedEventInfo);nexacro.GridTextChangedEventInfo.prototype=_pGridTextChangedEventInfo;_pGridTextChangedEventInfo._type_name="GridTextChangedEvent";_pGridTextChangedEventInfo._is_event=true;delete _pGridTextChangedEventInfo;nexacro.GridFormatChangedEventInfo=function(_a,_b,_c,_d,_e){this.id=this.eventid=_b||"ongridformatchanged";this.fromobject=this.fromreferenceobject=_a;this.newvalue=_c;this.oldvalue=_d;this.reason=_e;};var _pGridFormatChangedEventInfo=nexacro._createPrototype(nexacro.Event,nexacro.GridFormatChangedEventInfo);nexacro.GridFormatChangedEventInfo.prototype=_pGridFormatChangedEventInfo;_pGridFormatChangedEventInfo._type_name="GridFormatChangedEvent";delete _pGridFormatChangedEventInfo;nexacro.GridSelectEventInfo=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t){this.id=this.eventid=_b||"ongridselect";this.fromobject=this.fromreferenceobject=_a;this.cell=_c;this.col=_d;this.row=_e;this.subrow=_f;this.pivotindex=_g;this.oldcell=_h;this.oldcol=_i;this.oldrow=_j;this.oldpivotindex=_l;this.oldsubrow=_k;this.selectendcol=_m;this.selectendpivot=_n;this.selectendrow=_o;this.selectendsubrow=_p;this.selectstartcol=_q;this.selectstartpivot=_r;this.selectstartrow=_s;this.selectstartsubrow=_t;};var _pGridSelectEventInfo=nexacro._createPrototype(nexacro.Event,nexacro.GridSelectEventInfo);nexacro.GridSelectEventInfo.prototype=_pGridSelectEventInfo;_pGridSelectEventInfo._type_name="GridSelectEvent";delete _pGridSelectEventInfo;nexacro.GridTreeStatusEventInfo=function(_a,_b,_c,_d,_e,_f){this.id=this.eventid=_b||"ongridtreestatus";this.fromobject=this.fromreferenceobject=_a;this.cell=_c;this.realrow=_d;this.row=_e;this.reason=_f;};var _pGridTreeStatusEventInfo=nexacro._createPrototype(nexacro.Event,nexacro.GridTreeStatusEventInfo);nexacro.GridTreeStatusEventInfo.prototype=_pGridTreeStatusEventInfo;_pGridTreeStatusEventInfo._type_name="GridTreeStatusEvent";delete _pGridTreeStatusEventInfo;nexacro.GridMouseEventInfo=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t){nexacro.MouseEventInfo.call(this,_a,_b||"ongridmouse",_k,_l,_m,_n,_o,_p,_q,_r,_s,_t);this.cell=_c;this.col=_d;this.mergecell=_e;this.mergecol=_f;this.mergerow=_g;this.pivotindex=_h;this.row=_i;this.subrow=_j;};var _pGridMouseEventInfo=nexacro._createPrototype(nexacro.MouseEventInfo,nexacro.GridMouseEventInfo);nexacro.GridMouseEventInfo.prototype=_pGridMouseEventInfo;_pGridMouseEventInfo._type_name="GridMouseEvent";delete _pGridMouseEventInfo;nexacro.GridSizeChangedEventInfo=function(_a,_b,_c,_d,_e,_f,_g){this.eventid=_a;this.formatindex=_b;this.index=_c;this.newvalue=_d;this.oldvalue=_e;this.reason=_f;this.subindex=_g;};var _pGridSizeChangedEventInfo=nexacro._createPrototype(nexacro.Event,nexacro.GridSizeChangedEventInfo);nexacro.GridSizeChangedEventInfo.prototype=_pGridSizeChangedEventInfo;_pGridSizeChangedEventInfo._type_name="GridSizeChangedEventInfo";delete _pGridSizeChangedEventInfo;nexacro.GridCell=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){nexacro.Component.call(this,_a,"absolute",_b,_c,_d,_e,null,null,_f);this.tabstop=false;this.subcells=[];this.parentcell=null;this.style=_g.style;this._is_subcontrol=true;this._refobj=_g;this._grid=this._refobj?this._refobj.grid:null;this._rowidx=_h;this._cellidx=_i;this._styles=_g._styles;this._expand_width=0;this._subComp=null;this._selected=false;this._text_elem=null;this._curDisplayType="";this._curEditDisplay="";this._treeLeftGap=0;this._expandCtrl=null;this._comboInnerDataset=null;this._isSubCell=false;this._disp_show=true;this._band=_f._band;this._fakecell=false;this._hideInner=false;this._is_real_upelem=null;this._clickcall=false;this._is_clickproc=false;this._accessibility_role="gridcell";this._row_cells_update_pseudo=false;this._refresh_display=false;};var _pGridCell=nexacro._createPrototype(nexacro.Component,nexacro.GridCell);nexacro.GridCell.prototype=_pGridCell;_pGridCell._type_name="GridCell";_pGridCell.on_mouseleave_basic_action=function(_a){this._row_cells_update_pseudo=true;var _b=nexacro.Component.prototype.on_mouseleave_basic_action.call(this,_a);this._row_cells_update_pseudo=false;return _b;};_pGridCell.on_apply_custom_pseudo=function(_a){var _b=this.getElement();var _c=this._grid;if(!_b){return;}if(!_a){_a=this._pseudo;}var _d=this.currentstyle;var _e=this.on_find_CurrentStyle_font(_a);if(_d.font!=_e){_d.font=_e;this.on_apply_style_font(_e);}var _f=this.on_find_CurrentStyle_color(_a);if(_d.color!=_f){_d.color=_f;this.on_apply_style_color(_f);}var _g=this.on_find_CurrentStyle_align(_a);if(_d.align!=_g){_d.align=_g;this.on_apply_style_align(_g);}var _h=this.on_find_CurrentStyle_rtlimagemirroring(_a);if(_d.rtlimagemirroring!=_h){_d.rtlimagemirroring=_h;this.on_apply_style_rtlimagemirroring(_h);}this._display_text=this._getDisplayText();if(this._is_created&&(_c._mouseovercell==this||this._row_cells_update_pseudo==true)){if(!_c._ReasonRefresh){_c.on_apply_cell_pseudo(this,_a);}}};_pGridCell.on_create_custom_style=function(){return null;};_pGridCell.on_create_custom_currentStyle=function(){return new nexacro.GridCell_CurrentStyle();};_pGridCell.on_find_CurrentStyle_accessibility=function(_a){if(this._refobj&&!this._isSubCell){var _b=this._grid,_c=_b._getDataRow(this._rowidx);return this._refobj._query_pseudo_accessibility(_c,_a);}return null;};_pGridCell.on_find_CurrentStyle_background=function(_a){if(this._refobj&&!this._isSubCell){var _b=(this._rowidx>=0)?(this._rowidx%2):false,_c=this._grid,_d=_c._getDataRow(this._rowidx);return this._refobj._query_pseudo_background(_d,_b,this._isSelected(),_a);}return null;};_pGridCell.on_find_CurrentStyle_border=function(_a){var _b=this;if(this._refobj&&!this._isSubCell){var _c=_b._getSuppressInfo().border_proc;if(this._getDisplayRowIdx()==this._grid._getDispRowCnt()-1){_c=0;}var _d=this._grid,_e=_d._getDataRow(this._rowidx);var _f=this._refobj._query_pseudo_border(_e,this._isSelected(),_a,_c);var _g=_d._checkFakeMerge(this._refobj,_e);if(_g){var _h=_f.clone();if(_g.indexOf("right")>=0){_h.set_right("0px none transparent");}else if(_g.indexOf("left")>=0){_h.set_left("0px none transparent");}if(_g.indexOf("bottom")>=0){_h.set_bottom("0px none transparent");}else if(_g.indexOf("top")>=0){_h.set_top("0px none transparent");}return _h;}return _f;}return null;};_pGridCell.on_find_CurrentStyle_bordertype=function(_a){return null;};_pGridCell.on_find_CurrentStyle_gradation=function(_a){if(this._refobj&&!this._isSubCell){var _b=(this._rowidx>=0)?(this._rowidx%2):false,_c=this._grid,_d=_c._getDataRow(this._rowidx);return this._refobj._query_pseudo_gradation(_d,_b,this._isSelected(),_a);}return null;};_pGridCell.on_find_CurrentStyle_padding=function(_a){if(this._refobj){if(this.subcells.length>0){return nexacro.Component._default_padding;}var _b=this._grid,_c=_b._getDataRow(this._rowidx);return this._refobj._query_pseudo_padding(_c,_a);}return null;};_pGridCell.on_find_CurrentStyle_opacity=function(_a){return null;};_pGridCell.on_find_CurrentStyle_cursor=function(_a){if(this._isSubCell){return this.parent.on_find_CurrentStyle_cursor(_a);}if(this._refobj){var _b=this._grid,_c=_b._getDataRow(this._rowidx);if(_b._global_cursor){return _b._global_cursor;}return this._refobj._query_pseudo_cursor(_c,_a);}return null;};_pGridCell.on_find_CurrentStyle_shadow=function(_a){return null;};_pGridCell.on_find_CurrentStyle_font=function(_a){if(this._refobj){var _b=this._grid,_c=_b._getDataRow(this._rowidx);return this._refobj._query_pseudo_font(_c,this._isSelected(),_a);}return null;};_pGridCell.on_find_CurrentStyle_color=function(_a){var _b=this;if(this._isSubCell){_b=this.parentcell;}if(this._refobj){var _c=(this._rowidx>=0)?(this._rowidx%2):false;var _d=this._grid;var _e=_d._getDataRow(this._rowidx);return this._refobj._query_pseudo_color(_e,_c,_b._selected,_a);}return null;};_pGridCell.on_find_CurrentStyle_align=function(_a){if(this._refobj){var _b=this._curDisplayType;var _c=this._grid;var _d=_c._getDataRow(this._rowidx);if(_b==""){_b=this._refobj._getAttrValue(this._refobj.displaytype,_d);}if(_b===undefined){_b="normal";}var _e=this._refobj._query_pseudo_align(_d,_b,_a);return _e;}return null;};_pGridCell.on_find_CurrentStyle_rtlimagemirroring=function(_a){return this._grid.on_find_CurrentStyle_rtlimagemirroring(_a);};_pGridCell.on_create_contents=function(){this._disp_show=this._updateDisplayer();};_pGridCell.on_created_contents=function(){var _a=this.getElement();if(_a){if(this.subcells.length==0){var _b=this._subComp;if(_b){_b.on_created();}}var _c=this._expandCtrl;if(_c){_c.on_created();}var _d=this.currentstyle;if(_d&&_d.font){this.on_apply_style_font(_d.font);}if(nexacro._enableaccessibility){var _e=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_e&&_e.enable&&!this._grid._accept_focus){this._grid._accept_focus=true;}if(nexacro._accessibilitytype==4){var _f=this._getAccessibilityMakeAddLabel();_f=_f+" "+this._getCellAccessibilityLabel();this._setAccessibilityLabel(_f);}}}};_pGridCell._destroyDisplayer=function(_a){if(this._subComp){if(_a){nexacro.OnceCallbackTimer.callonce(this,function(){if(this._subComp){this._subComp.destroy();this._subComp=null;}},10);}else{this._subComp.destroy();this._subComp=null;}}};_pGridCell.destroy=function(){if(this._tree_lbuttondown&&this._grid){if(nexacro.Browser=="IE"&&nexacro.BrowserVersion<=8){this._control_element.destroy();}this._grid._lbuttondown_treecell=this;nexacro.OnceCallbackTimer.callonce(this._grid,function(){if(this._lbuttondown_treecell){this._lbuttondown_treecell.destroy();}},10);return;}if(this._grid._lbuttondown_treecell==this){this._grid._lbuttondown_treecell=null;}nexacro.Component.prototype.destroy.call(this);};_pGridCell._delete_style=function(){this.style=null;this._styles=null;};_pGridCell.on_destroy_contents=function(){this._destroyDisplayer();if(this._expandCtrl){this._expandCtrl.destroy();this._expandCtrl=null;}if(this._comboInnerDataset){this._comboInnerDataset._removeEventHandler("onvaluechanged",this._updateAll,this);this._comboInnerDataset._removeEventHandler("onrowsetchanged",this._updateAll,this);}var _a=this.subcells;var _b=_a.length;for(var _c=0;_c<_b;_c++ ){_a[_c].destroy();}this.subcells=this._refobj=this._grid=this.parentcell=this._band=this._text_elem=this._comboInnerDataset=this._is_real_upelem=null;};_pGridCell.on_change_containerRect=function(_a,_b){this._updateAvailableArea();};_pGridCell.on_create_control_element=function(_a){var _b=(this._refobj._subcells.length)?"normal":"text";var _c=new nexacro.GridCellControlElement(_a,this._refobj._area,_b);_c.setLinkedControl(this);this._control_element=_c;return _c;};_pGridCell.on_apply_custom_setfocus=function(_a){var _b=this._control_element;if(_a=="lbuttondown"){this._grid._focus_proc=_b;}nexacro.Component.prototype.on_apply_custom_setfocus.call(this,_a);if(nexacro._enableaccessibility){this._grid.currentcell=this._cellidx;this._grid._currentBand=this._band.id;}};_pGridCell.on_apply_prop_tooltip=function(){var _a=this.getElement();var _b=this._grid;var _c=_b._getDataRow(this._rowidx);this.tooltiptext=this._refobj._getTooltipText(_c);if(_a){_a.setElementToolTip(this.tooltiptext);}};_pGridCell._on_last_lbuttonup=function(){this.parent._on_last_lbuttonup();};_pGridCell._on_last_keyup=function(){this.parent._on_last_keyup();};_pGridCell._on_killfocus=function(_a,_b){if(this._status!="disable"){if(this._readonly){this._status="readonly";}else{this._status="enable";}}this._setAccessibilityStatFlag(this._status,this._pseudo);};_pGridCell._getAccessibilityLabel=function(_a){var _b=nexacro.Component.prototype._getAccessibilityLabel.call(this,_a);if(!_b&&this.subcells.length>0){var _c=this.subcells;for(var _d=0;_d<_c.length;_d++ ){if(_c[_d]._display_text){if(_b){_b=_b+" "+_c[_d]._display_text;}else{_b=_c[_d]._display_text;}}}}if(nexacro._accessibilitytype==4&&this._is_created){var _e=this._getAccessibilityMakeAddLabel();if(_a){if(_a._bindexpr&&_a._bindexpr.length>0){_b=this._refobj._getAttrValue(_a,this._rowidx);}}_b=_e+" "+_b;}return _b;};_pGridCell._setAccessibilityStatFocus=function(){var _a=this._grid;if(_a._currentCellEditor&&_a._showEditing){_a._currentCellEditor._setAccessibilityStatFocus();}else if(this._subComp&&this._curDisplayType!="tree"){this._subComp._setAccessibilityStatFocus();}else{var _b="";var _c=this._refobj;_b=this._getAccessibilityMakeAddLabel();_b+=" "+this._getCellAccessibilityLabel();this._setAccessibilityStatSelected(this._selected);this._setAccessibilityLabel(_b);nexacro.Component.prototype._setAccessibilityStatFocus.call(this);}};_pGridCell._getCellAccessibilityLabel=function(){var _a="";var _b=this._grid;var _c=null;var _d=this._refobj;_c=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_c){if(_c._bindexpr&&_c._bindexpr.length>0){var _e="";_d=this._refobj;_e=_d._getAttrValue(_c,this._rowidx);_c._setValue(_e);}_a=this._getAccessibilityLabel(_c);}if(this._subComp){var _f=this._subComp;var _g=this._curDisplayType;if(_g=="checkbox"){this._setAccessibilityStatChecked(_f.isChecked());}else if(_g=="tree"){var _h=_b.getTreeStatus(this._rowidx);var _i=_d._getTreeLevel(this._rowidx);var _j=_d._getTreeStartLevel(this._rowidx);if(nexacro._accessibilitytype!=4){if(_h==0){this._setAccessibilityStatExpanded(false);}else{this._setAccessibilityStatExpanded(true);}}this._setAccessibilityInfoLevel(_i-_j+1);}}if(_c&&nexacro._accessibilitytype==5){var _k=this._getAccessibilityDescription(_c);var _l=this._getAccessibilityAction(_c);_a=_a+" "+_l+" "+_k;}return _a;};_pGridCell._getAccessibilityMakeAddLabel=function(){var _a="",_b=this._grid,_c=this._refobj;if(_b._first_focus&&_b._control_element&&nexacro._accessibilitytype!=5){_a=_b._getAccessibilityLabel(_b.on_find_CurrentStyle_accessibility(_b._pseudo));}if(_c.celltype=="body"||_c.celltype=="summary"){var _d=_b._headBand;var _e="",_f=null,_g=null,_h=null,_i="",_j="";if(this.parentcell){_f=this.parentcell.parent._cells;}else{_f=this.parent._cells;}for(var _k=0;_k<_f.length;_k++ ){_h=_f[_k]._refobj;_g=_f[_k].on_find_CurrentStyle_accessibility(this._pseudo);if(_g&&_h._area=="left"){if(_g._bindexpr&&_g._bindexpr.length>0){_i=_h._getAttrValue(_g,this._rowidx);_g._setValue(_i);}_e=_f[_k]._getAccessibilityLabel(_g);if(_h._row<=_c._row&&_c._row<=(_h._row+_h._rowspan-1)){if(_i){_i+=" "+_e;}else{_i=_e;}}}else{break;}}if(_d){var _l=_d._get_rows();_f=_l[0]._cells;for(var _k=0;_k<_f.length;_k++ ){_h=_f[_k]._refobj;_g=_f[_k].on_find_CurrentStyle_accessibility(this._pseudo);if(_g){if(_g._bindexpr&&_g._bindexpr.length>0){_d=_h._getAttrValue(_g,this._rowidx);_g._setValue(_d);}_e=_f[_k]._getAccessibilityLabel(_g);if(_h._col<=_c._col&&_c._col<=(_h._colspan+_h._col-1)){if(_j){_j=_j+" "+_e;}else{_j=_e;}}}}}if(_c._area=="left"){if(_j){_a+=" "+_j;}}else{if(_b.accessibilityreadbandlabel){_a+=" "+_i+" "+_j;}else{if(_i&&_b._beforegridrowpos!=_b.currentrow){_a+=" "+_i;}if(_b._beforegridcolpos!=_b.currentcol||(_b._is_first_bodycell&&(_b.currentcell==0||_b.currentrow==_b.rowcount-1))){if(_j){if(_a){_a=_a+" "+_j;}else{_a=_j;}}}}}}return _a;};_pGridCell._getAccessibilityRole=function(_a){var _b=_a.role;if(!_b){var _c=this._refobj;_b=this._accessibility_role;if(_c.celltype=="head"){_b="columnheader";}else if(_c.celltype=="body"&&_c._area=="left"){_b="rowheader";}if(this._curDisplayType=="tree"){_b="treeitem";}else if(this._subComp){_a=this._subComp.on_find_CurrentStyle_accessibility(this._pseudo);_b=this._subComp._getAccessibilityRole(_a);}}return _b;};_pGridCell.on_get_style_accessibility_label=function(){return this._display_text;};_pGridCell._setAccessibilityNotifyEvent=function(_a){var _b=this._getAccessibilityMakeAddLabel();_b+=" "+this._getCellAccessibilityLabel();this._setAccessibilityLabel(_b);return nexacro.Component.prototype._setAccessibilityNotifyEvent.call(this,_a);};_pGridCell._resetScrollPos=function(_a,_b,_c,_d,_e,_f){var _g=this._grid;if(_g){_g._hideEditor();this.parent._showfull(this);}};_pGridCell.on_apply_text=function(){var _a=this._text_elem;if(_a){var _b=this._refobj;var _c=this._grid._getDataRow(this._rowidx);var _d=_b._getAttrValue(_b.displaytype,_c);if(_d=="decoratetext"){_a.decoration=null;_a.setElementDecorateText(this._display_text);}else{_a.decoration="";_a.text=null;_a.setElementText(this._display_text);}}};_pGridCell.on_apply_wordwrap=function(){var _a=this._grid;var _b=_a._getDataRow(this._rowidx);var _c=this._refobj._getWordwrap(_b);var _d=this._text_elem;if(_d){_d.setElementWordWrap(_c);}};_pGridCell.on_apply_style_font=function(_a){var _b=this._text_elem;if(_b){_b.setElementFont(_a);}};_pGridCell.on_apply_style_color=function(_a){var _b=this._text_elem;if(_b){_b.setElementColor(_a);}};_pGridCell.on_apply_style_align=function(_a){var _b=this._text_elem;if(_b){var _c=_a.halign==""?"center":_a.halign;var _d=_a.valign==""?"middle":_a.valign;_b.setElementAlignXY(_c,_d);}if(this._subComp&&this._subComp._setAlign){this._subComp._setAlign(_a.halign,_a.valign);}};_pGridCell.on_apply_style_ctrlAlign=function(_a,_b){var _c=this._subComp._adjust_width;var _d=this._subComp._adjust_height;var _e=this._getAvailableRect();var _f=_e.width;var _g=_e.height;var _h=0,_i=0;switch(_a){case "left":break;case "right":_h=_f-_c;break;default:_h=Math.round((_f-_c)/2);break;}switch(_b){case "top":break;case "bottom":_i=_g-_d;break;default:_i=Math.round((_g-_d)/2);break;}this._subComp.move(_h,_i,this._subComp._adjust_width,this._subComp._adjust_height);};_pGridCell._common_lbuttonup=function(_a,_b,_c,_d,_e){if(_a){var _f=nexacro._getFirstTouchInfo(_a);if(_f){_b=_f._elem;_c=_f.canvasX;_d=_f.canvasY;_e=_b;}}if(_b!=_e){var _g=this._is_real_upelem=_e;var _h=this._grid;var _i=false;while(_g){if(_g._type_name=="GridCell"){_h._lastmouseentercell=_g;}if(_g._type_name=="Grid"){_i=true;break;}_g=_g.parent;}if(!_g){this._is_real_upelem=_g;}if(nexacro.Browser=="IE"&&!_i){if(_h._showEditing&&_c>=0&&_c=0&&_d=_k&&_i[0]<=_l){_j=true;}}else{if(_i[0]>=_f._client_width-_h[0]){_j=true;}}if(_j){if(_b=="top"){if(_i[1]<=_h[1]){_g="text";}}else if(_b=="middle"){var _m=(_f._client_height-_h[1])/2;var _n=_m+_h[1];if(_i[1]>=_m&&_i[1]<=_n){_g="text";}}else{if(_i[1]>=_f._client_height-_h[1]){_g="text";}}}return _g;};_pGridCell._clickitem="";_pGridCell._on_click=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){if(_a instanceof nexacro.ControlElement){this._clickitem="border";}else if(_a instanceof nexacro.TextBoxElement){var _k,_l;if(_a.align){_k=_a.align._halign;_l=_a.align._valign;}else if(_a.halign&&_a.valign){_k=_a.halign;_l=_a.valign;}this._clickitem=this._getClickItem(_k,_l,_f,_g,_a.text,this);}var _j=nexacro.Component.prototype._on_click.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i);this._clickitem="";return _j;};_pGridCell.on_fire_onclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){if(!_n){var _o=_l;while(_o&&_o instanceof nexacro.Component){if(_o instanceof nexacro.GridCell){break;}var _p=_o._getRecalcCanvasXY(_l._control_element,_g,_h);_g=_p[0];_h=_p[1];if(this._subComp==_o){break;}_o=_o.parent;}}if(this._isSubCell){_g+=this._adjust_left;_h+=this._adjust_top;_i+=this._adjust_left;_j+=this._adjust_top;}if(this._subComp==_k){curstyle=this.currentstyle;if(curstyle&&curstyle.padding){_g+=curstyle.padding.left;_h+=curstyle.padding.top;_i+=curstyle.padding.left;_j+=curstyle.padding.top;}}if(this._band){this._is_clickproc=true;if(nexacro.Browser=="IE"){if(!(this._grid.onlbuttondown&&this._grid.onlbuttondown.defaultprevented==true)||(this._grid.onlbuttonup&&this._grid.onlbuttonup.defaultprevented==true)){if(!this._grid._showEditing){this._setFocus(false);}}}if(_m==undefined){_m=this._clickitem;}if(this._grid._scrollpixel=="all"){this._showfull(this);}else{this.parent._showfull(this);}if(this._band.id=="body"){this._grid.on_fire_cellclick(this,_m,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);}else if(this._band.id=="head"){this._grid.on_fire_headclick(this,_m,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);}else if(this._band.id=="summ"){this._grid.on_fire_summclick(this,_m,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);}this._needToggle("onclick",_k);}return true;};_pGridCell.on_fire_ondblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){var _n=_l;while(_n&&_n instanceof nexacro.Component){if(_n instanceof nexacro.GridCell){break;}var _o=_n._getRecalcCanvasXY(_l._control_element,_g,_h);_g=_o[0];_h=_o[1];if(this._subComp==_n){break;}_n=_n.parent;}if(this._isSubCell){_g+=this._adjust_left;_h+=this._adjust_top;_i+=this._adjust_left;_j+=this._adjust_top;}if(this._subComp==_k){curstyle=this.currentstyle;if(curstyle&&curstyle.padding){_g+=curstyle.padding.left;_h+=curstyle.padding.top;_i+=curstyle.padding.left;_j+=curstyle.padding.top;}}if(this._band){nexacro._fireBeforeDblclick(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);if(_m==undefined){_m="";}if(this._band.id=="body"){return this._grid.on_fire_celldblclick(this,_m,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);}else if(this._band.id=="head"){return this._grid.on_fire_headdblclick(this,_m,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);}else if(this._band.id=="summ"){return this._grid.on_fire_summdblclick(this,_m,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);}if(!this._is_alive){return;}}return true;};_pGridCell.on_fire_onsize=function(_a,_b){var _c=this._grid._currentCellEditor;var _d=this._grid;var _e=_d._getDataRow(this._rowidx);if(_c){if(_d._currentCellCell==this._cellidx&&this._grid._currentCellRow==_e){var _f=this._setPositionInGrid(_c);}}return false;};_pGridCell.on_fire_onmove=function(_a,_b){var _c=this._grid._currentCellEditor;var _d=this._grid;var _e=_d._getDataRow(this._rowidx);if(_c){if(_d._currentCellCell==this._cellidx&&this._grid._currentCellRow==_e){var _f=this._setPositionInGrid(_c);}}return false;};_pGridCell._applyMouseLeaveEvent=function(){var _a=this._grid;if(_a){if(_a._isSelectRowType()&&this._pseudo=="mouseover"){_a.on_apply_cell_pseudo(this,"normal");}else{this._stat_change("normal","normal");}}};_pGridCell._applyMouseOverEvent=function(){var _a=this._grid;if(_a&&this._pseudo=="normal"){_a.on_apply_cell_pseudo(this,"mouseover");}};_pGridCell._hideInnerElement=function(){this.getElement().setContainerVisible(false);this._hideInner=true;};_pGridCell._showInnerElement=function(){this.getElement().setContainerVisible(true);this._hideInner=false;};_pGridCell._createDisplayer=function(_a){var _b="";var _c=this._grid;var _d=this._refobj;var _e=_c._getDataRow(this._rowidx);switch(_a){case "button":this._createButtonDisplayer();break;case "checkbox":this._createCheckboxDisplayer();break;case "image":this._createImageDisplayer();break;case "tree":this._createTreeDisplayer();_c._treeCellinfo=_d;break;case "combo":_b=_d._getAttrValue(_d.combodisplay,_e);if(_b=="display"){this._createComboDisplayer();}else{this._createTextDisplayer();}var _f=_d._getAttrValue(_d.combodataset,_e);var _g=this._comboInnerDataset=_c._findDataset(_f);if(_g){_g._setEventHandler("onvaluechanged",this._updateAll,this);_g._setEventHandler("onrowsetchanged",this._updateAll,this);}break;case "date":_b=_d._getAttrValue(_d.calendardisplay,_e);if(_b=="display"){this._createCalendarDisplayer();}else{this._createTextDisplayer();}break;case "text":case "decoratetext":case "normal":_b=_d._getAttrValue(_d.editdisplay,_e);var _h=_d._getEdittype(_e);if(_b=="display"){if(_h=="textarea"||_h=="readonly"){this._createTextAreaDisplayer();}else{this._createEditDisplayer();}}else{this._createTextDisplayer();}break;case "number":case "exponent":case "currency":_b=_d._getAttrValue(_d.editdisplay,_e);if(_b=="display"){this._createEditDisplayer();}else{this._createTextDisplayer();}break;case "bar":this._createBarDisplayer();break;}this._curDisplayType=_a;this._curEditDisplay=_b;};_pGridCell._isChangeDisplayer=function(_a,_b){var _c=this._grid;var _d=this._curDisplayType;if((_a!=_d)||_c._changeDisplayer){return true;}var _e="";var _f=this._refobj;if(_d=="combo"){_e=_f._getAttrValue(_f.combodisplay,_b);}else if(_d=="date"){_e=_f._getAttrValue(_f.calendardisplay,_b);}else if(_d=="text"||_d=="decoratetext"||_d=="normal"||_d=="number"||_d=="exponent"||_d=="currency"){_e=_f._getAttrValue(_f.editdisplay,_b);}if(_e!=this._curEditDisplay){return true;}return false;};_pGridCell._updateDisplayer=function(){var _a=this._grid;var _b=this._refobj;var _c=_a._getDataRow(this._rowidx);var _d=_b._getAttrValue(_b.displaytype,_c);var _e=true;var _f=this._band;if(_d===undefined){_d="normal";}if(this._isChangeDisplayer(_d,_c)==true){if(this._curDisplayType!=""){this._destroyDisplayer(_a._lbuttondown_proc);}this._createDisplayer(_d);if(this._subComp&&!this._subComp._is_created){this._subComp.on_created();}}else{this.on_apply_wordwrap();}var _g=_b._getAttrValue(_b.expandshow,_c);var _h=_b._getAttrValue(_b.expandsize,_c);if(_g=="show"){if(!this._expandCtrl){this._createExpandDisplayer();}else{if(this._expand_width!=_h){this._expandCtrl.destroy();this._expandCtrl=null;this._createExpandDisplayer();}else{this._changeClientmode("expand");}}this._expandCtrl.set_visible(true);this._control_element._updateClientSize();this._updateClientSize(this._control_element);}else{if(this._expandCtrl){if(this._expand_width!=_h){this._expandCtrl.destroy();this._expandCtrl=null;this._createExpandDisplayer();}this._expandCtrl.set_visible(false);this._control_element._updateClientSize();this._updateClientSize(this._control_element);if(this._control_element._mode=="expandtext"){this._changeClientmode("text");}}}var _i=_a._isFakeCell(_c);if(_i){if(_a.fillareatype=="datarow"){if(!this._isDisplayDataType(_d)){if(_d!="date"){_e=false;if(_i!=this._fakecell||_a._resetfillarea){this._hideInnerElement();this._fakecell=_i;}}}}else if(_a.fillareatype=="linerow"){_e=false;if(_i!=this._fakecell||_a._resetfillarea){this._hideInnerElement();this._fakecell=_i;}}else if(_a.fillareatype=="controlrow"){if(this._isDisplayDataType(_d)){_e=false;if(_i!=this._fakecell||_a._resetfillarea){this._hideInnerElement();this._fakecell=_i;}}}}else{if(_i!=this._fakecell){this._showInnerElement();this._fakecell=_i;}}return _e;};_pGridCell._isUpdateArea=function(){if(this._isSubCell){return true;}var _a=this.parent,_b=_a.getElement(),_c=_b.scroll_left,_d=_c+this._grid._adjust_width;var _e=this._refobj;if(_e._area!="body"||(_c<=this._getPosRight()&&_d>=this._adjust_left)){return true;}return false;};_pGridCell._updateAll=function(_a,_b){this._rowidx=this.parent._rowidx;var _c=this.getElement();if(_c){if(this._isUpdateArea()==false){return;}var _d=this._grid;var _e=this._disp_show=this._updateDisplayer();var _f=_d._getDataRow(this._rowidx);if(_d._currentCellRow>=0){var _g=this._text_elem;if(_g){if(_d._currentCellCell==this._cellidx&&_d._currentCellRow==_f){_g.setElementTextVisible(false);}else{_g.setElementTextVisible(true);}}}this._display_text=this._getDisplayText();this.on_apply_text();this._control_pseudo="";this._contents_pseudo="";_a=_a===undefined?"normal":_a;this.on_apply_pseudo(_a,_b);var _h=this._subComp;if(_h&&this._ReasonRefresh!=1){_h._control_pseudo="";_h._contents_pseudo="";_h._updateAll();}if(this._expandCtrl){this._expandCtrl._updateAll();}this.on_apply_prop_tooltip();if(this.subcells.length>0){for(var _i=0;_i0){this._hideInnerElement();}else{if(_e){var _j=this._getSuppressInfo();this._text_proc=_j.text_proc;this._border_proc=_j.border_proc;if(_j.text_proc!=0){this._hideInnerElement();}else{this._showInnerElement();}}}}else{if(_e&&this._hideInner){this._showInnerElement();}}}if(_c._mode=="text"){this._changeClientmode("text");}if(_d._isFakeCell(_f)==false){if(this._refobj._getSuppress(_f)==0){var _k=_d._checkFakeMerge(this._refobj,_f);if(_k){this._hideInnerElement();}else{this._showInnerElement();}}}if(nexacro._enableaccessibility&&nexacro._accessibilitytype==4&&this._is_created){var _l=this._getAccessibilityMakeAddLabel();_l=_l+" "+this._getCellAccessibilityLabel();this._setAccessibilityLabel(_l);}}};_pGridCell._getSuppressInfo=function(){return this._refobj._getSuppressInfo(this._getDisplayRowIdx());};_pGridCell._getAvailableRect=function(){var _a=this._grid;var _b=_a._getAvailableRect(this);return _b;};_pGridCell._changeClientmode=function(_a){var _b=this.getElement();var _c=null;if(_b){var _d=this.currentstyle.padding;if(this._refobj._subcells.length){_a="normal";}else if(_a=="expand"){if(_b._mode!="normal"){_a="expandtext";}else{_a="normal";}}else if(_a=="text"){if(this._expandCtrl){_a="expandtext";}else if(_d){_a=(_d.right>0||_d.bottom>0)?"expandtext":"text";}}_c=_b._changeMode(_a,this.currentstyle.padding);if(_a=="text"||_a=="expandtext"){this._text_elem=_c;}else{this._text_elem=null;}}};_pGridCell._createExpandDisplayer=function(){var _a=this.getElement();if(_a){this._changeClientmode("expand");var _b=this._grid._getDataRow(this._rowidx);this._expand_width=this._refobj._getAttrValue(this._refobj.expandsize,_b);var _c=this.on_find_CurrentStyle_border(this._pseudo);var _d=this._adjust_width-this._expand_width-((_c)?_c._right_width:0);var _e=0;var _f=_d+this._expand_width;var _g=this._adjust_height-((_c)?_c._bottom_width:0);if(_d<0){_d=0;_f=this._adjust_width;}var _h=this._expandCtrl=new nexacro.GridExpand(this,_d,_e,_f,_g);_h.createComponent();this._control_element._setExpandControl(this._expandCtrl,this._expand_width);}};_pGridCell._createTextDisplayer=function(){var _a=this.getElement();if(_a){var _b=this._getAvailableRect();this._changeClientmode("text");var _c=this._text_elem;if(_c){this.on_apply_wordwrap();}this.currentstyle._empty();}};_pGridCell._createButtonDisplayer=function(_a,_b){var _c=this.getElement();if(_c){var _d=this._getAvailableRect();var _e=_d.width;var _f=_d.height;this._changeClientmode("normal");var _g=new nexacro.GridControlButton("controlbutton",0,0,_e,_f,this,true);_g._is_subcontrol=true;_g.createComponent(true);this._subComp=_g;var _h=this._grid;var _i=_h._getDataRow(this._rowidx);var _j=this._refobj._getWordwrap(_i);_g.set_wordwrap(_j);this.currentstyle._empty();}};_pGridCell._createCheckboxDisplayer=function(_a,_b){var _c=this.getElement();if(_c){this._changeClientmode("normal");var _d=new nexacro.GridControlCheckbox("controlcheckbox",0,0,0,0,this,true);_d._is_subcontrol=true;_d.createComponent(true);this._subComp=_d;this.currentstyle._empty();}};_pGridCell._createImageDisplayer=function(_a,_b){var _c=this.getElement();if(_c){var _d=this._getAvailableRect();var _e=_d.width;var _f=_d.height;var _g=16;var _h=Math.round((_e-_g)/2);var _i=Math.round((_f-_g)/2);var _j=_h+_g;var _k=_i+_g;this._changeClientmode("normal");var _l=new nexacro.GridControlImage("controlimage",_h,_i,_g,_g,this);_l._is_subcontrol=true;_l.createComponent(true);this._subComp=_l;this.currentstyle._empty();}};_pGridCell._createTreeDisplayer=function(_a,_b){var _c=this.getElement();if(_c){var _d=this._getAvailableRect();var _e=_d.width;var _f=_d.height;this._changeClientmode("normal");var _g=this._subComp=new nexacro.GridControlTree("controltree",0,0,_e,_f,this);_g._is_subcontrol=true;_g.createComponent(true);this._subComp=_g;this.currentstyle._empty();}};_pGridCell._createComboDisplayer=function(_a,_b){var _c=this.getElement();if(_c){var _d=this._getAvailableRect();var _e=_d.width;var _f=_d.height;this._changeClientmode("normal");var _g=new nexacro.GridControlCombo("controlcombo",0,0,_e,_f,this,true);_g._cellinfo=this._refobj;_g._is_subcontrol=true;_g.createComponent(true);_g.comboedit._input_element._isUseDelCaret=true;this._subComp=_g;this.currentstyle._empty();}};_pGridCell._createCalendarDisplayer=function(_a,_b){var _c=this.getElement();if(_c){var _d=this._getAvailableRect();var _e=_d.width;var _f=_d.height;this._changeClientmode("normal");var _g=this._subComp=new nexacro.GridControlCalendar("controlcalendar",0,0,_e,_f,this,true);_g._cellinfo=this._refobj;_g._is_subcontrol=true;_g.createComponent(true);_g.calendaredit._input_element._isUseDelCaret=true;this._subComp=_g;this.currentstyle._empty();}};_pGridCell._createEditDisplayer=function(_a,_b){var _c=this.getElement();if(_c){var _d=this._getAvailableRect();var _e=_d.width;var _f=_d.height;this._changeClientmode("normal");var _g=this._subComp=new nexacro.GridControlEdit("controledit",0,0,_e,_f,this,true);_g._is_subcontrol=true;_g.createComponent(true);_g._input_element._isUseDelCaret=true;this._subComp=_g;this.currentstyle._empty();}};_pGridCell._createTextAreaDisplayer=function(_a,_b){var _c=this.getElement();if(_c){var _d=this._getAvailableRect();var _e=_d.width;var _f=_d.height;this._changeClientmode("normal");var _g=this._subComp=new nexacro.GridControlTextArea("controltextarea",0,0,_e,_f,this,true);_g._isSubControl=true;_g.createComponent(true);_g._input_element._isUseDelCaret=true;this._subComp=_g;var _h=this._grid;var _i=_h._getDataRow(this._rowidx);var _j=this._refobj._getWordwrap(_i);_g.set_wordwrap(_j);this.currentstyle._empty();}};_pGridCell._createBarDisplayer=function(_a,_b){var _c=this.getElement();if(_c){var _d=this._getAvailableRect();var _e=_d.width;var _f=_d.height;this._changeClientmode("normal");var _g=this._subComp=new nexacro.GridControlBar("controlprogressbar",0,0,_e,_f,this,true);_g._is_subcontrol=true;_g.createComponent(true);this._subComp=_g;this.currentstyle._empty();}};_pGridCell._updateAvailableArea=function(){var _a=this._getAvailableRect();var _b=this._subComp;if(_b){var _d=_a.width;var _e=_a.height;if(this._curDisplayType=="checkbox"||this._curDisplayType=="image"){var _f=this.currentstyle.align;if(_f&&!_f._is_empty){this.on_apply_style_ctrlAlign(_f.halign,_f.valign);}}else{_b.move(0,0,_d,_e);}}var _c=this._expandCtrl;if(_c){var _g=_c.left;var _h=this._client_top;var _i=_c.width;var _j=_a.height;_c._applysetPosition(_g,_h,_i,_j);}};_pGridCell._isEnable=function(){return this._grid._enable;};_pGridCell._getDisplayRowIdx=function(){return this._rowidx-this._grid._getBodyBegRowPos(this._rowidx);};_pGridCell._isSelected=function(){return (this._selected&&this._grid.useselcolor);};_pGridCell._getResultPseudo=function(_a,_b){if(this._isSelected()){_b="selected";}else{_b=nexacro.Component._status_table[_a+"_"+_b];}var _c=this._grid;if(_b=="mouseover"){_c._mouseRowPos=_c._getDataRow(this._rowidx);_c._mouseCellPos=this._cellidx;}else{_c._mouseRowPos= -9;_c._mouseCellPos= -1;}var _d=_c._getDataRow(this._rowidx);if((_c._isFakeCell(_d)&&_b!="disabled")||nexacro._cur_track_info||nexacro.isTouchInteraction){_b="normal";}else{if(_c.useselcolor==false&&this._selected){if(_c._mouseovercell==this){_b="mouseover";}}var _e=_c._mouseRowPos;if(_e==_d&&_b=="normal"&&this._isSelected()==false){_b="mouseover";}}return _b;};_pGridCell._getDisplayText=function(){if(this._refobj){var _a=this._grid;var _b=_a._getDataRow(this._rowidx);return this._refobj._getDisplayText(_b);}return "";};_pGridCell._setDisplayText=function(){this._display_text=this._getDisplayText();this.on_apply_text();};_pGridCell.__updateCustomStyles=function(){this.on_apply_wordwrap();};_pGridCell._isDisplayDataType=function(_a){if(_a=="number"||_a=="exponent"||_a=="currency"||_a=="normal"||_a=="text"||_a=="decoratetext"){return true;}return false;};_pGridCell._showfull=function(_a){if(this._isSubCell){return this.parent._showfull();}var _b=this._band;var _c=this._grid._getScrollLeft();var _d=this._grid._getScrollTop();var _e=_b._control_element;var _f=this.parent._adjust_top;var _g=this._adjust_left;var _h=this._adjust_top+_f;var _i=this._adjust_width;var _j=this._adjust_height;var _k=_g+_i;var _l=_h+_j;_g-=_c;_k-=_c;_h-=_d;_l-=_d;var _m=this._grid;var _n=this.parent;var _o=_m.hscrollbar;var _p=_m.vscrollbar;var _q=this._refobj;var _r=_n._getAreaRect(_q._area);if(_o&&_q._area=="body"){if(_i<_r.width){if(_g<0){if(_o._isEnable()){_o.set_pos(_o.pos+_g);}}else if(_k>_r.width){var _s=_k-_r.width;if(_o._isEnable()){_o.set_pos(_o.pos+_s);}}}}if(_b.id=="body"){if(_p&&_a&&!_n._fixed){if(_j<_b._client_height){if(_h<0){if(_p._isEnable()){_p._set_pixelpos(_p._pos+_h);}}else if(_l>_b._client_height){var _t=_l-_b._client_height;if(_p._isEnable()){_p._set_pixelpos(_p._pos+_t);}}}}}};_pGridCell._needToggle=function(_a,_b){if(!this._is_alive){return;}var _c=this._grid;var _d=_c._getDataRow(this._rowidx);var _e=this._refobj._getEdittype(_d);if(_c.selectchangetype=="down"&&_a=="onclick"){return;}else if(_c.selectchangetype=="up"&&_a=="onlbuttondown"){return;}if(_e=="checkbox"){if(this._curDisplayType!="checkbox"){_c._toggleVal(_d,this._refobj);}else{if(_a=="onclick"||_a=="onlbuttondown"){if(this._grid.cellclickbound=="cell"&&_b==this){if(this._subComp&&this._subComp._toggleCheck){this._subComp._toggleCheck();}}}else{if(this._subComp&&this._subComp._toggleCheck){this._subComp._toggleCheck();}}}}};_pGridCell._setPositionInGrid=function(_a,_b,_c){var _d=(this._isSubCell)?this.parent.parent:this.parent;var _e=this._band;var _f=this._grid;var _g=this._refobj;var _h=_d._getAreaRect(_g._area);var _i=_h.left;var _j=_h.left+_h.width;var _k=(_e.id=="body"&&_d._fixed);var _l=_e._adjust_top+((_e.id=="body"&&_k==false)?_f._fixed_height:0);var _m=_e._getPosBottom();var _n=this._adjust_left+_i;var _o=_d._adjust_top+this._adjust_top+_l;if(!_b){var _w=(_k)?0:_f._getScrollTop();var _x=_f._getScrollLeft();if(_g._area=="body"){_n-=(_x>=0)?_x:0;}if(_e.id=="body"){_o-=(_w>=0)?_w:0;}}if(_e._refobj._noborder==true&&_g._row==0&&this._getDisplayRowIdx()<=0){_o+=(this.currentstyle.border)?this.currentstyle.border._bottom_width:0;}var _p=this._getAvailableRect();if(!_c){var _y=this.currentstyle.padding;_n+=(_y)?_y.left:0;_o+=(_y)?_y.top:0;}var _q=_n+_p.width;var _r=_o+_p.height;var _s=_o,_t=_n;if(_o<_l){_o=_l;}if(_r>_m){_r=_m;}if(_n<_i){_n=_i;}if(_q>_j){_q=_j;}var _u=_q-_n;var _v=_r-_o;if(_u<0){_u=0;}if(_v<0){_v=0;}if(_a){if(_u==0||_v==0){_a.move(0, -10,0,0);}else{_a.move(_n,_o,_u,_v);}}return {left:_n,top:_o,right:_q,bottom:_r,width:_u,height:_v,orgt:_s,orgl:_t};};_pGridCell._showEditor=function(_a,_b){var _c=this._text_elem;var _d=this._refobj;var _e=this._grid;var _f=_e._getDataRow(this._rowidx);var _g;_e._currentCellCell=this._cellidx;_e._currentCellRow=_f;if(!_a){if(this._grid._showEditing){this._grid._hideEditor();}if(_c){_c.setElementTextVisible(false);}if(this._subComp){this._subComp.set_visible(false);}_g=this._grid._createEditor(this);this._setPositionInGrid(_g);_g._EditUpdateAll(_d,this);_g.set_visible(true);if(nexacro.isTouchInteraction||_e.selectchangetype=="up"){_g._setFocus(false);}_g._stat_change("focus","focused");}else{if(this._subComp){this._subComp.set_visible(false);}_g=this._grid._currentCellEditor;if(_g){_g._cellinfo=_d;_g._cellobj=this;this._setPositionInGrid(_g);if(_b==true){_g._setFocus(false);}}}};_pGridCell._hideEditor=function(){var _a=this._text_elem;if(_a){_a.setElementTextVisible(true);}this._grid._currentCellCell= -1;this._grid._currentCellRow= -1;if(this._subComp){this._subComp.set_visible(true);}};_pGridCell._hasEditor=function(){var _a=this._refobj;var _b=this._grid;var _c=_b._getDataRow(this._rowidx);var _d=_a._getEdittype(_c);switch(_d){case "none":return false;case "normal":case "text":case "combo":case "date":case "mask":case "masknumber":case "textarea":case "button":case "readonly":return true;}return false;};delete _pGridCell;nexacro.GridExpand=function(_a,_b,_c,_d,_e,_f){nexacro.Component.call(this,"controlexpand","absolute",_b,_c,_d-_b,_e-_c,null,null,_a);this.tabstop=false;this.parent=_a;this._is_subcontrol=true;this._is_nc_control=true;this._controlmode=(_f)?true:false;if(_a._refobj){this._grid=_a._grid;this._cellobj=_a;this._cellinfo=_a._refobj;}else{this._grid=_a;}this._text="";this._imagetext="";};var _pGridExpand=nexacro._createPrototype(nexacro.Component,nexacro.GridExpand);nexacro.GridExpand.prototype=_pGridExpand;_pGridExpand._type_name="GridExpand";_pGridExpand._text_elem=null;_pGridExpand._img_elem=null;_pGridExpand._makeCssRefInfo=function(){return (this._grid._makeCssRefInfoCtrl(this));};_pGridExpand.on_create_contents=function(){var _a=this.getElement();if(_a){var _b=this.currentstyle;if(this._text){var _c=this._text_elem=new nexacro.TextBoxElement(_a);var _d=_b.align.halign==""?"center":_b.align._halign;var _e=_b.align.valign==""?"middle":_b.align._valign;_c.setElementFont(_b.font);_c.setElementColor(_b.color);_c.setElementAlignXY(_d,_e);}if(this._imagetext){this._setExpandImg(this._imagetext);}}};_pGridExpand.on_created_contents=function(){var _a=this._text_elem;var _b=this._img_elem;if(_b){_b.create();}if(_a){_a.create();}};_pGridExpand.on_destroy_contents=function(){var _a=this.getElement();if(_a){if(this._text_elem){this._text_elem.destroy();this._text_elem=null;}if(this._img_elem){this._img_elem.destroy();this._img_elem=null;}}this._grid=null;this._cellobj=null;this._cellinfo=null;};_pGridExpand.on_change_containerRect=function(_a,_b){};_pGridExpand._setAccessibilityStatFocus=function(){var _a=this._cellobj;var _b=_a._getAccessibilityMakeAddLabel();var _c="";var _d=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_d){if(_d._bindexpr&&_d._bindexpr.length>0){_c=this._cellinfo._getAttrValue(_d,this._rowidx);_d._setValue(_c);}_c=this._getAccessibilityLabel(_d);}else{_c=_a._getCellAccessibilityLabel();}_b+=" "+_c;this._setAccessibilityLabel(_b);nexacro.Component.prototype._setAccessibilityStatFocus.call(this);};_pGridExpand.on_get_style_accessibility_description=function(){if(this._cellobj){this._cellobj.tooltiptext;}};_pGridExpand.on_get_style_accessibility_label=function(){return this.text;};_pGridExpand.on_fire_user_ontouchstart=function(_a,_b,_c,_d){this._cellobj.on_fire_user_ontouchstart(_a,_b,_c,_d);var _e=nexacro._getFirstTouchInfo(_b);if(_e){return this._grid.on_fire_onexpanddown("",false,false,false,_e.screenX,_e.screenY,_e.canvasX,_e.canvasY,_e.clientX,_e.clientY,_c,_d);}};_pGridExpand.on_fire_user_onlbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){this._cellobj.on_fire_user_onlbuttondown(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);return this._grid.on_fire_onexpanddown(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);};_pGridExpand.on_fire_user_ontouchend=function(_a,_b,_c,_d){this._cellobj.on_fire_user_ontouchend(_a,_b,_c,_d);var _e=nexacro._getFirstTouchInfo(_b);if(_e){return this._grid.on_fire_onexpandup("",false,false,false,_e.screenX,_e.screenY,_e.canvasX,_e.canvasY,_e.clientX,_e.clientY,_c,_d);}};_pGridExpand.on_fire_user_onlbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){this._cellobj.on_fire_user_onlbuttonup(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);return this._grid.on_fire_onexpandup(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);};_pGridExpand.on_fire_ondblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){return this._cellobj.on_fire_ondblclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);};_pGridExpand.on_fire_onclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){return this._cellobj.on_fire_onclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);};_pGridExpand._on_last_lbuttonup=function(){this._cellobj._on_last_lbuttonup();};_pGridExpand._on_last_keyup=function(){this._cellobj._on_last_keyup();};_pGridExpand._isEnable=function(){return this._grid._enable;};_pGridExpand._setPositionEx=function(){var _a=this._text_elem;if(_a){_a.setElementPosition(0,0);var _b=this._grid._getAvailableRect(this);_a.setElementSize(_b.width,_b.height);}_a=this._img_elem;if(_a){this._imgAdjustAlign(this._image_width,this._image_height);}};_pGridExpand._imgAdjustAlign=function(_a,_b){var _c=this._grid._getAvailableRect(this);var _d=this._img_elem;if(_d){var _e=0;var _f=0;var _g=_c.height;var _h=_c.width;if(_a>_h){_e=_e-((_a-_h)/2);}else{_e=(_h-_a)/2;}if(_b>_g){_f=_f-((_b-_g)/2);}else{_f=(_g-_b)/2;}_d.setElementPosition(_e,_f);_d.setElementSize(_a,_b);}};_pGridExpand._on_loadImg=function(_a,_b,_c){if(!this._is_alive||!this._img_elem){return;}this._img_elem.setElementImageUrl(_a);this._imgAdjustAlign(_b,_c);};_pGridExpand.on_apply_custom_pseudo=function(_a){if(!this._is_created){return;}var _b=this.getElement();if(!_b){return;}if(!_a){_a=this._pseudo;}var _c=this._grid;if(this._cellobj._is_created){if(!_c._ReasonRefresh){_c.on_apply_cell_pseudo(this._cellobj,_a);}}};_pGridExpand._updateAll=function(){var _a=this.getElement();if(_a){var _b=this._grid;var _c=_b._getDataRow(this._cellobj._rowidx);this.on_apply_pseudo(this._pseudo);var _d=this._cellinfo._getAttrValue(this._cellinfo.expandimage,_c);this._setExpandImg(_d);_d=this._cellinfo._getAttrValue(this._cellinfo.expandchar,_c);this._setExpandText(_d);_d=this._cellobj.on_find_CurrentStyle_font(this._cellobj._pseudo);this._setFont(_d);_d=this._cellobj.on_find_CurrentStyle_color(this._cellobj._pseudo);this._setColor(_d);this._setAlign("center","middle");this._setPositionEx();}};_pGridExpand._setExpandImg=function(_a){var _b=this.getElement();if(_b&&_a){var _c=(_a)?_a.toString():null;if(_c){var _d=this._img_elem;if(!_d){_d=new nexacro.ImageElement(_b);this._img_elem=_d;_d.create();}_c=nexacro._getURIValue(_c);_c=nexacro._getImageLocation(_c,this._getRefFormBaseUrl());var _e=nexacro._getImageSize(_c,this._on_loadImg,this);if(_e){this._image_width=_e.width;this._image_height=_e.height;_d.setElementImageUrl(_c);}}else{if(this._img_elem){this._img_elem.destroy();this._img_elem=null;if(this._text_elem){var _f=this.currentstyle.align;var _g=_f.halign==""?"center":_f._halign;var _h=_f.valign==""?"middle":_f._valign;this._text_elem.setElementAlignXY(_g,_h);}}}}};_pGridExpand._setExpandText=function(_a){var _b=this.getElement();if(_b){if(this._text!=_a){this._text=_a;var _c=this._text_elem;var _d=this.currentstyle;if(!_c){_c=this._text_elem=new nexacro.TextBoxElement(_b);var _e=(!_d.align||_d.align.halign=="")?"center":_d.align.halign;var _f=(!_d.align||_d.align.valign=="")?"middle":_d.align.valign;_c.setElementFont(_d.font);_c.setElementColor(_d.color);_c.setElementAlignXY(_e,_f);_c.create();}_c.setElementText(_a);}}};_pGridExpand._setFont=function(_a){var _b=this._text_elem;if(_b){_b.setElementFont(_a);}};_pGridExpand._setColor=function(_a){var _b=this._text_elem;if(_b){_b.setElementColor(_a);}};_pGridExpand._setAlign=function(_a,_b){var _c=this._text_elem;if(_c){_c.setElementAlignXY(_a,_b);}};delete _pGridExpand;nexacro.GridControlButton=function(_a,_b,_c,_d,_e,_f,_g,_h){nexacro.ButtonCtrl.call(this,_a,"absolute",_b,_c,_d,_e,null,null,_f);this.tabstop=false;this._displaymode=(_g)?true:false;this._controlmode=(_h)?true:false;this._clickevt_able=true;if(_f._refobj){this._grid=_f._refobj.grid;this._cellinfo=_f._refobj;this._cellobj=_f;}else{this._grid=_f;this._cellinfo=null;this._cellobj=null;}};var _pGridButton=nexacro._createPrototype(nexacro.ButtonCtrl,nexacro.GridControlButton);nexacro.GridControlButton.prototype=_pGridButton;_pGridButton.on_find_CurrentStyle_align=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("align",_a,"align");return _d;}return null;};_pGridButton.on_find_CurrentStyle_accessibility=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("accessibility",_a,"accessibility");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_accessibility(_f,_a);}return _d;}return null;};_pGridButton.on_find_CurrentStyle_background=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("background",_a,"background");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_background(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridButton.on_find_CurrentStyle_border=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("border",_a,"border");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_border(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridButton.on_find_CurrentStyle_bordertype=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("bordertype",_a,"bordertype");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);return _d;}return null;};_pGridButton.on_find_CurrentStyle_color=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("color",_a,"color");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_color(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridButton.on_find_CurrentStyle_font=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("font",_a,"font");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_font(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridButton.on_find_CurrentStyle_gradation=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("gradation",_a,"gradation");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_gradation(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridButton.on_find_CurrentStyle_cursor=function(_a){var _b=this._grid;if(_b._global_cursor){return _b._global_cursor;}var _c=this._find_pseudo_obj("cursor",_a)||this.parent.on_find_CurrentStyle_cursor(_a);return (_c)?_c:nexacro.Component._default_cursor;};_pGridButton._makeCssRefInfo=function(){return (this._grid._makeCssRefInfoCtrl(this));};_pGridButton._find_pseudo_obj=function(_a,_b,_c){var _d=this._cellinfo;if(this._displaymode==true){if(_b!="disabled"){_b="normal";}}var _e=this._grid;var _f=_e._getDataRow(this._cellobj._rowidx);if(this._cellobj&&this._grid._isFakeCell(_f)&&_b!="disabled"){_b="normal";}_f=_e._getDataRow(this._cellobj._rowidx);var _g="control"+_a;var _h=_d._query_pseudo_control(this,_f,_g,_a,_b,_c);return _h;};_pGridButton.on_destroy_contents=function(){nexacro.ButtonCtrl.prototype.on_destroy_contents.call(this);this._grid=null;this._cellinfo=null;this._cellobj=null;};_pGridButton._setAccessibilityStatFocus=function(){var _a=this._cellobj;var _b=_a._getAccessibilityMakeAddLabel();var _c="";var _d=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_d){if(_d._bindexpr&&_d._bindexpr.length>0){_c=this._cellinfo._getAttrValue(_d,this._rowidx);_d._setValue(_c);}_c=this._getAccessibilityLabel(_d);}else{_c=_a._getCellAccessibilityLabel();}_b+=" "+_c;this._setAccessibilityLabel(_b);nexacro.Component.prototype._setAccessibilityStatFocus.call(this);};_pGridButton.on_apply_custom_setfocus=function(_a){if(!this._displaymode){nexacro.ButtonCtrl.prototype.on_apply_custom_setfocus.call(this,_a);}};_pGridButton.on_get_style_accessibility_description=function(){if(this._cellobj){return this._cellobj.tooltiptext;}};_pGridButton.on_get_style_accessibility_label=function(){return this.text;};_pGridButton.on_fire_user_onkeyup=function(_a,_b,_c,_d,_e,_f){var _g=nexacro.Component.prototype.on_fire_user_onkeyup.call(this,_a,_b,_c,_d,_e,_f);if(_a==13||_a==32){this.click();}return _g;};_pGridButton._on_bubble_touchend=function(_a,_b,_c,_d,_e,_f,_g){var _h=true;if(_g){_h=this._cellobj._common_lbuttonup(_c,null,null,null,null);}if(_h){nexacro.ButtonCtrl.prototype._on_bubble_touchend.call(this,_a,_b,_c,_d,_e,_f,_g);}return true;};_pGridButton._on_bubble_lbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_lbuttonup(null,_a,_f,_g,_m);}if(_o){nexacro.ButtonCtrl.prototype._on_bubble_lbuttonup.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridButton._on_bubble_mouseenter=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_mouseenter();}if(_o){nexacro.ButtonCtrl.prototype._on_bubble_mouseenter.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridButton._on_bubble_mouseleave=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_mouseleave();}if(_o){nexacro.ButtonCtrl.prototype._on_bubble_mouseleave.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridButton.on_fire_user_ontouchstart=function(_a,_b,_c,_d){nexacro.ButtonCtrl.prototype.on_fire_user_ontouchstart.call(this,_a,_b,_c,_d);this._cellobj.on_fire_user_ontouchstart(_a,_b,_c,_d);return true;};_pGridButton.on_fire_user_onlbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){nexacro.ButtonCtrl.prototype.on_fire_user_onlbuttondown.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_user_onlbuttondown(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);return true;};_pGridButton.on_fire_user_ontouchend=function(_a,_b,_c,_d){nexacro.ButtonCtrl.prototype.on_fire_user_ontouchend.call(this,_a,_b,_c,_d);this._cellobj.on_fire_user_ontouchend(_a,_b,_c,_d);return true;};_pGridButton.on_fire_user_onlbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){nexacro.ButtonCtrl.prototype.on_fire_user_onlbuttonup.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);this._cellobj.on_fire_user_onlbuttonup(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);return true;};_pGridButton.on_fire_onclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){nexacro.ButtonCtrl.prototype.on_fire_onclick.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_onclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,"control");return true;};_pGridButton.on_fire_ondblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){nexacro.ButtonCtrl.prototype.on_fire_ondblclick.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_ondblclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,"control");return true;};_pGridButton._on_last_lbuttonup=function(){this._cellobj._on_last_lbuttonup();};_pGridButton._on_last_keyup=function(){this._cellobj._on_last_keyup();};_pGridButton._on_click=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){if(!this._is_alive){return;}var _j=this.visible;if(this._displaymode&&this._grid.selectchangetype=="up"){_j=true;}if(_j&&this._isEnable()&&this.enableevent){var _k=this._getClientXY(_f,_g);this.on_fire_onclick(_b,_c,_d,_e,_h,_i,_f,_g,_k[0],_k[1],this,this);}};_pGridButton._isEnable=function(){return this._grid._enable;};_pGridButton._EditUpdateAll=function(_a,_b){if(this.getElement()){this._cellinfo=_a;this._cellobj=_b;this._setProperty();this._control_pseudo="";this._contents_pseudo="";this.on_apply_pseudo(this._pseudo);var _c=this._grid;var _d=_c._getDataRow(_b._rowidx);var _e=_a._getWordwrap(_d);this.set_wordwrap(_e);}};_pGridButton._setDataset=function(_a){};_pGridButton._setProperty=function(){var _a=this._cellinfo;var _b=this._cellobj;var _c=this._grid;var _d=_c._getDataRow(_b._rowidx);var _e;if(this._displaymode==true){_e=_a._getDisplayText(_d);}else{_e=_a._getValue(_d);}_e=nexacro._toString(_e);if(_e!=null){this.set_text(_e);}else{this.set_text("");}};_pGridButton._updateAll=function(){this.on_apply_pseudo(this._pseudo);this._setProperty();};delete _pGridButton;nexacro.GridControlBar=function(_a,_b,_c,_d,_e,_f,_g){nexacro.ProgressBarCtrl.call(this,_a,"absolute",_b,_c,_d,_e,null,null,_f);this.tabstop=false;this.max=100;this.min=0;this.blockgap=0;this.step=1;this._controlmode=(_g)?true:false;if(_f._refobj){this._grid=_f._refobj.grid;this._cellinfo=_f._refobj;this._cellobj=_f;}else{this._grid=_f;}};var _pGridBar=nexacro.GridControlBar.prototype=nexacro._createPrototype(nexacro.ProgressBarCtrl,nexacro.GridControlBar);_pGridBar.on_find_CurrentStyle_align=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("align",_a,"align");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_align(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridBar.on_find_CurrentStyle_font=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_inherit_pseudo_obj("font",_a,"font");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_font(_f,_c._selected,_a);}return _d;}return null;};_pGridBar.on_find_CurrentStyle_color=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=(this._rowidx>=0)?(this._rowidx%2):false;var _e=this._find_inherit_pseudo_obj("color",_a,"color");var _f=this._grid;var _g=_f._getDataRow(_c._rowidx);if(!_e){_e=_b._query_pseudo_color(_g,_d,_c._selected,_a);}return _e;}return null;};_pGridBar.on_find_CurrentStyle_cursor=function(_a){var _b=this._grid;if(_b._global_cursor){return _b._global_cursor;}var _c=this._find_pseudo_obj("cursor",_a)||this.parent.on_find_CurrentStyle_cursor(_a);return (_c)?_c:nexacro.Component._default_cursor;};_pGridBar.on_find_CurrentStyle_accessibility=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("accessibility",_a,"accessibility");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_accessibility(_f,_a);}return _d;}return null;};_pGridBar.on_find_CurrentStyle_background=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("background",_a,"background");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_background(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridBar.on_find_CurrentStyle_border=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("border",_a,"border");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_border(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridBar.on_find_CurrentStyle_bordertype=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("bordertype",_a,"bordertype");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);return _d;}return null;};_pGridBar.on_find_CurrentStyle_gradation=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("gradation",_a,"gradation");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_gradation(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridBar._makeCssRefInfo=function(){return (this._grid._makeCssRefInfoCtrl(this));};_pGridBar._find_pseudo_obj=function(_a,_b,_c){var _d=this._cellinfo;var _e="control"+_a;var _f=this._grid;var _g=_f._getDataRow(this._cellobj._rowidx);if(this._cellobj&&this._grid._isFakeCell(_g)&&_b!="disabled"){_b="normal";}if(_a=="barcolor"||_a=="bardirection"||_a=="bargradation"){_e="";}else if(_a=="padding"){return null;}_g=_f._getDataRow(this._cellobj._rowidx);var _h=_d._query_pseudo_control(this,_g,_e,_a,_b,_c);return _h;};_pGridBar.on_destroy_contents=function(){nexacro.ProgressBarCtrl.prototype.on_destroy_contents.call(this);this._grid=null;this._cellinfo=null;this._cellobj=null;};_pGridBar._setAccessibilityStatFocus=function(){var _a=this._cellobj;var _b=_a._getAccessibilityMakeAddLabel();var _c="";var _d=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_d){if(_d._bindexpr&&_d._bindexpr.length>0){_c=this._cellinfo._getAttrValue(_d,this._rowidx);_d._setValue(_c);}_c=this._getAccessibilityLabel(_d);}else{_c=_a._getCellAccessibilityLabel();}_b+=" "+_c;this._setAccessibilityLabel(_b);nexacro.Component.prototype._setAccessibilityStatFocus.call(this);};_pGridBar.on_get_style_accessibility_description=function(){if(this._cellobj){return this._cellobj.tooltiptext;}};_pGridBar.set_text=function(_a){var _b=nexacro.Component.prototype.set_text.call(this,_a);this.set_pos(parseInt(this._display_text));return _b;};_pGridBar.on_apply_text=function(){var _a=this.getElement();if(_a){var _b=this._text_elem;var _c=this.currentstyle.align;if(!_c){this.on_apply_custom_pseudo(this._pseudo);_c=this.currentstyle.align;}if(!_b){_b=new nexacro.TextBoxElement(_a);this._text_elem=_b;var _d=this._grid._getAvailableRect(this);_b.setElementSize(_d.width,_d.height);if(this._is_created){var _e=(!_c||_c.halign=="")?"center":_c._halign;var _f=(!_c||_c.valign=="")?"middle":_c._valign;_b.setElementColor(this.currentstyle.color);_b.setElementFont(this.currentstyle.font);_b.setElementAlignXY(_e,_f);_b.create();}}else{var _e=(!_c||_c.halign=="")?"center":_c._halign;var _f=(!_c||_c.valign=="")?"middle":_c._valign;_b.setElementColor(this.currentstyle.color);_b.setElementFont(this.currentstyle.font);_b.setElementAlignXY(_e,_f);}this._text_elem.setElementText(this._display_text);}};_pGridBar.on_fire_onclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){return this._cellobj.on_fire_onclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,"control");};_pGridBar.on_fire_ondblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){return this._cellobj.on_fire_ondblclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,"control");};_pGridBar._on_last_lbuttonup=function(){this._cellobj._on_last_lbuttonup();};_pGridBar._on_last_keyup=function(){this._cellobj._on_last_keyup();};_pGridBar._isEnable=function(){return this._grid._enable;};_pGridBar._getDisplayText=function(){if(this.parent){return this.parent._getDisplayText();}return "";};_pGridBar._updateAll=function(){if(this.getElement()){this.on_apply_pseudo(this._pseudo);this._setProperty();}};_pGridBar._setProperty=function(){var _a=this._cellinfo;var _b=this._cellobj;var _c=this._grid;var _d=_c._getDataRow(_b._rowidx);var _e=_a._getDisplayText(_d);_e=nexacro._toString(_e);if(_e!=null){this.set_text(_e);}else{this.set_text("");}};delete _pGridBar;nexacro.GridControlEdit=function(_a,_b,_c,_d,_e,_f,_g,_h){nexacro.EditCtrl.call(this,_a,"absolute",_b,_c,_d,_e,null,null,_f);this.tabstop=false;this.editfilter="none";if(_g){this._displaymode=true;this.readonly=true;}else{this._displaymode=false;}this._controlmode=(_h)?true:false;if(_f._refobj){this._grid=_f._refobj.grid;this._cellinfo=_f._refobj;this._cellobj=_f;}else{this._grid=_f;}this._absolutelyValue=false;};var _pGridEdit=nexacro._createPrototype(nexacro.EditCtrl,nexacro.GridControlEdit);nexacro.GridControlEdit.prototype=_pGridEdit;_pGridEdit._displaymode=false;_pGridEdit.on_find_CurrentStyle_align=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){if(this._displaymode){if(_a!="disabled"){_a="normal";}}var _d=this._find_pseudo_obj("align",_a,"align");return _d;}return null;};_pGridEdit.on_find_CurrentStyle_font=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){if(this._displaymode){if(_a!="disabled"){_a="normal";}}var _d=this._find_inherit_pseudo_obj("font",_a);if(!_d){_d=_c.on_find_CurrentStyle_font(_a);}return _d;}return null;};_pGridEdit.on_find_CurrentStyle_color=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){if(this._displaymode){if(_a!="disabled"){_a="normal";}}var _d=this._find_inherit_pseudo_obj("color",_a);if(!_d){_d=_c.on_find_CurrentStyle_color(_a);}return _d;}return null;};_pGridEdit.on_find_CurrentStyle_accessibility=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("accessibility",_a,"accessibility");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_accessibility(_f,_a);}return _d;}return null;};_pGridEdit.on_find_CurrentStyle_background=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("background",_a,"background");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_background(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridEdit.on_find_CurrentStyle_border=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("border",_a,"border");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_border(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridEdit.on_find_CurrentStyle_bordertype=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("bordertype",_a,"bordertype");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);return _d;}return null;};_pGridEdit.on_find_CurrentStyle_gradation=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("gradation",_a,"gradation");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_gradation(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridEdit._makeCssRefInfo=function(){return (this._grid._makeCssRefInfoCtrl(this));};_pGridEdit._find_pseudo_obj=function(_a,_b,_c){var _d=this._cellinfo;if(this._displaymode==true){if(_b!="disabled"){_b="normal";}}var _e=this._grid;var _f=_e._getDataRow(this._cellobj._rowidx);var _g="control"+_a;var _h=_d._query_pseudo_control(this,_f,_g,_a,_b,_c);return _h;};_pGridEdit.on_destroy_contents=function(){nexacro.EditCtrl.prototype.on_destroy_contents.call(this);this._grid=null;this._cellinfo=null;this._cellobj=null;};_pGridEdit.on_apply_custom_setfocus=function(_a,_b){if(this._grid._onceTime_focus&&!_b){nexacro.OnceCallbackTimer.callonce(this,function(){this.on_apply_custom_setfocus(_a,true);},0);return;}return nexacro.EditCtrl.prototype.on_apply_custom_setfocus.call(this,_a);};_pGridEdit._setAccessibilityStatFocus=function(){var _a=this._cellobj;var _b=_a._getAccessibilityMakeAddLabel();var _c="";var _d=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_d){if(_d._bindexpr&&_d._bindexpr.length>0){_c=this._cellinfo._getAttrValue(_d,this._rowidx);_d._setValue(_c);}_c=this._getAccessibilityLabel(_d);}else{_c=_a._getCellAccessibilityLabel();}_b+=" "+_c;this._setAccessibilityLabel(_b);nexacro.Component.prototype._setAccessibilityStatFocus.call(this);};_pGridEdit.on_get_style_accessibility_description=function(){if(this._cellobj){return this._cellobj.tooltiptext;}};_pGridEdit.on_apply_autoskip=function(){this._grid._moveToCell("next",true);};_pGridEdit.on_apply_editfilter=function(_a){switch(_a){case 'alpha':case 'alpha,number':case 'digit':case 'number':case 'alpha,digit':this.set_inputfilter("none");this.set_inputtype(_a);break;case 'lower':case 'upper':this.set_inputfilter("none");this.set_inputtype("alpha");break;case 'lower,digit':case 'upper,digit':this.set_inputfilter("none");this.set_inputtype("alpha,digit");break;case 'lower,number':case 'upper,number':this.set_inputfilter("none");this.set_inputtype("alpha,number");break;case 'none':this.set_inputfilter("none");this.set_inputtype("normal");break;case 'alpha,number,nosign':case 'lower,number,nosign':case 'upper,number,nosign':this.set_inputfilter("sign");this.set_inputtype("alpha,number");break;case 'char':case 'lower,char':case 'upper,char':this.set_inputfilter("comma,symbol,sign,digit,dot");this.set_inputtype("normal");break;case 'integer':this.set_inputfilter("dot");this.set_inputtype("number");break;case 'digit,char':case 'lower,digit,char':case 'upper,digit,char':this.set_inputfilter("comma,symbol,sign,dot");this.set_inputtype("normal");break;case 'number,char':case 'lower,number,char':case 'upper,number,char':this.set_inputfilter("comma,symbol");this.set_inputtype("normal");break;}if(_a.indexOf("upper")>=0){this.set_inputmode("upper");}else if(_a.indexOf("lower")>=0){this.set_inputmode("lower");}else{this.set_inputmode("normal");}};_pGridEdit.set_editfilter=function(_a){if(this.editfilter!=_a){this.editfilter=_a;this.on_apply_editfilter(_a);}return _a;};_pGridEdit._on_bubble_touchend=function(_a,_b,_c,_d,_e,_f,_g){var _h=true;if(_g){_h=this._cellobj._common_lbuttonup(_c,null,null,null,null);}if(_h){nexacro.EditCtrl.prototype._on_bubble_touchend.call(this,_a,_b,_c,_d,_e,_f,_g);}return true;};_pGridEdit._on_bubble_lbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_lbuttonup(null,_a,_f,_g,_m);}if(_o){nexacro.EditCtrl.prototype._on_bubble_lbuttonup.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridEdit._on_bubble_mouseenter=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_mouseenter();}if(_o){nexacro.EditCtrl.prototype._on_bubble_mouseenter.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridEdit._on_bubble_mouseleave=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_mouseleave();}if(_o){nexacro.EditCtrl.prototype._on_bubble_mouseleave.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridEdit.on_fire_onkillfocus=function(_a,_b){return this._cellobj.on_fire_onkillfocus(_a,_b);};_pGridEdit.on_fire_ontextchange=function(_a){if(this._absolutelyValue==true){return true;}nexacro.EditCtrl.prototype.on_fire_ontextchange.call(this,_a);return this._grid.on_fire_ontextchange(this,_a.chartext,_a.pretext,_a.posttext,_a.preimetext,_a.postimetext);};_pGridEdit.on_fire_ontextchanged=function(_a,_b,_c){return this._grid.on_fire_ontextchanged(_a,_b,_c);};_pGridEdit.on_fire_user_ontouchend=function(_a,_b,_c,_d){nexacro.EditCtrl.prototype.on_fire_user_ontouchend.call(this,_a,_b,_c,_d);this._cellobj.on_fire_user_ontouchend(_a,_b,_c,_d);return true;};_pGridEdit.on_fire_user_onlbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){nexacro.EditCtrl.prototype.on_fire_user_onlbuttonup.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);this._cellobj.on_fire_user_onlbuttonup(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);return true;};_pGridEdit.on_fire_user_ontouchstart=function(_a,_b,_c,_d){nexacro.EditCtrl.prototype.on_fire_user_ontouchstart.call(this,_a,_b,_c,_d);this._cellobj.on_fire_user_ontouchstart(_a,_b,_c,_d);return true;};_pGridEdit.on_fire_user_onlbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){nexacro.EditCtrl.prototype.on_fire_user_onlbuttondown.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_user_onlbuttondown(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);return true;};_pGridEdit.on_fire_oneditclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o){nexacro.EditCtrl.prototype.on_fire_oneditclick.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);this._cellobj.on_fire_onclick(_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o);return true;};_pGridEdit.on_fire_ondblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(this._displaymode){this.setSelect(0,0);}nexacro.EditCtrl.prototype.on_fire_ondblclick.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_ondblclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,"control");return true;};if(nexacro.Browser=="Gecko"||nexacro.Browser=="Opera"){_pGridEdit._on_click=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){if(!this._is_alive){return;}var _j=this.visible;if(this._displaymode){_j=true;}var _k="";if(_a instanceof nexacro.InputElement){var _l,_m;if(_a.align){_l=_a.align._halign;_m=_a.align._valign;}else if(_a.halign&&_a.valign){_l=_a.halign;_m=_a.valign;}_k=this._cellobj._getClickItem(_l,_m,_f,_g,_a.text,this);}if(!_k){_k="control";}if(_j&&this._isEnable()&&this.enableevent){var _n=this.getCaretPos();var _o=this._getClientXY(_f,_g);this.on_fire_oneditclick(this,_n,_b,_c,_d,_e,_h,_i,_f,_g,_o[0],_o[1],this,this,_k);}};}else{_pGridEdit._on_click=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){if(!this._is_alive){return;}var _j=this.visible;if(this._displaymode&&this._grid.selectchangetype=="up"){_j=true;}var _k="";if(_a instanceof nexacro.InputElement){var _l,_m;if(_a.align){_l=_a.align._halign;_m=_a.align._valign;}else if(_a.halign&&_a.valign){_l=_a.halign;_m=_a.valign;}_k=this._cellobj._getClickItem(_l,_m,_f,_g,_a.text,this);}if(!_k){_k="control";}if(_j&&this._isEnable()&&this.enableevent){var _n=this.getCaretPos();var _o=this._getClientXY(_f,_g);this.on_fire_oneditclick(this,_n,_b,_c,_d,_e,_h,_i,_f,_g,_o[0],_o[1],this,this,_k);}};}_pGridEdit._on_last_lbuttonup=function(){this._cellobj._on_last_lbuttonup();};_pGridEdit._on_last_keyup=function(){this._cellobj._on_last_keyup();};_pGridEdit.on_getBindableProperties=function(){if(!this._displaymode){return "value";}};_pGridEdit._isEnable=function(){return this._grid._enable;};_pGridEdit._set_absolutelyValue=function(_a){this._absolutelyValue=true;this.set_value(_a);this._absolutelyValue=false;};_pGridEdit._updateAll=function(){if(this.getElement()){this.on_apply_pseudo(this._pseudo);this._setProperty();}};_pGridEdit._setProperty=function(){var _a=this._cellinfo;var _b=this._cellobj;var _c=this._grid;var _d=_c._getDataRow(_b._rowidx);var _e;if(this._displaymode==true){_e=_a._getDisplayText(_d);}else{_e=_a._getValue(_d);}this._set_absolutelyValue(_e);_e=_a._getAttrValue(_a.editautoselect,_d);if(_e!=null){this.set_autoselect(_e);}_e=_a._getAttrValue(_a.editautoskip,_d);if(_e!=null){this.set_autoskip(_e);}_e=_a._getAttrValue(_a.editfilter,_d);if(_e!=null){this.set_editfilter(_e);}_e=_a._getAttrValue(_a.editimemode,_d);if(_e!=null){this.set_imemode(_e);}_e=_a._getAttrValue(_a.edituseime,_d);if(_e!=null){this.set_useime(_e);}_e=_a._getAttrValue(_a.editlengthunit,_d);if(_e!=null){this.set_lengthunit(_e);}};_pGridEdit._EditUpdateAll=function(_a,_b){if(this.getElement()){this._cellinfo=_a;this._cellobj=_b;this._setProperty();this._control_pseudo="";this._contents_pseudo="";this.on_apply_pseudo(this._pseudo);}};_pGridEdit._setDataset=function(_a,_b){var _c=this._cellobj;var _d=this._cellinfo;var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);var _g=this._edit_base_api;if(_g){if(_g._is_composition()){var _j=_g._stat_composition.getCurrentStatus();var _k=_g._stat_composition.getData();var _l=_g._on_input_compositionend(_k);if(!_l){_g._fire_text_event(_k);}if(nexacro.Browser=="Safari"){if(_j==nexacro.EditBase.Status.CompositionStart){_g._on_input_compositionstart(_k);}else if(_j==nexacro.EditBase.Status.CompositionUpdate){_g._on_input_compositionupdate(_k);}}}}var _h=this.value;if(_b!=undefined){_f=_b;}var _i=true;if(_d.text._bindtype==1){this._grid._is_async_recreate=_a;this._grid._dsEventOccured=true;var _m={status:""};_d.grid._binddataset._setColumn(_f,_d.text._bindexpr,_h,_m);if(_m.status=="cancolumnchange"){_i=false;}this._grid._dsEventOccured=false;}return _i;};_pGridEdit._on_input_blur=function(_a,_b){var _c=this._grid;var _d=this._edit_base_api;if(_d){var _e=_d._stat_composition.getCurrentStatus();var _f=_d._stat_composition.getData();_c._currentCompositionStatus=_e;_c._currentCompositionData=_f;_d._on_input_blur(_a,_b);}};delete _pGridEdit;nexacro.GridControlTextArea=function(_a,_b,_c,_d,_e,_f,_g,_h){nexacro.TextAreaCtrl.call(this,_a,"absolute",_b,_c,_d,_e,null,null,_f);this.tabstop=false;this.editfilter="none";if(_g){this._displaymode=true;this.readonly=true;}else{this._displaymode=false;}this._controlmode=(_h)?true:false;if(_f._refobj){this._grid=_f._refobj.grid;this._cellinfo=_f._refobj;this._cellobj=_f;}else{this._grid=_f;}this._absolutelyValue=false;};var _pGridTextArea=nexacro._createPrototype(nexacro.TextAreaCtrl,nexacro.GridControlTextArea);nexacro.GridControlTextArea.prototype=_pGridTextArea;_pGridTextArea.on_find_CurrentStyle_align=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){if(this._displaymode){if(_a!="disabled"){_a="normal";}}var _d=this._find_pseudo_obj("align",_a,"align");return _d;}return null;};_pGridTextArea.on_find_CurrentStyle_color=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){if(this._displaymode){if(_a!="disabled"){_a="normal";}}var _d=this._find_inherit_pseudo_obj("font",_a);if(!_d){_d=_c.on_find_CurrentStyle_font(_a);}return _d;}return null;};_pGridTextArea.on_find_CurrentStyle_color=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){if(this._displaymode){if(_a!="disabled"){_a="normal";}}var _d=this._find_inherit_pseudo_obj("color",_a);if(!_d){_d=_c.on_find_CurrentStyle_color(_a);}return _d;}return null;};_pGridTextArea.on_find_CurrentStyle_accessibility=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("accessibility",_a,"accessibility");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_accessibility(_f,_a);}return _d;}return null;};_pGridTextArea.on_find_CurrentStyle_background=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("background",_a,"background");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_background(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridTextArea.on_find_CurrentStyle_border=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("border",_a,"border");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_border(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridTextArea.on_find_CurrentStyle_bordertype=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("bordertype",_a,"bordertype");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);return _d;}return null;};_pGridTextArea.on_find_CurrentStyle_gradation=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("gradation",_a,"gradation");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_gradation(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridTextArea._makeCssRefInfo=function(){return (this._grid._makeCssRefInfoCtrl(this));};_pGridTextArea._find_pseudo_obj=function(_a,_b,_c){var _d=this._cellinfo;if(this._displaymode==true){if(_b!="disabled"){_b="normal";}}var _e=this._grid;var _f=_e._getDataRow(this._cellobj._rowidx);if(this._cellobj&&this._grid._isFakeCell(_f)&&_b!="disabled"){_b="normal";}_f=_e._getDataRow(this._cellobj._rowidx);var _g="control"+_a;var _h=_d._query_pseudo_control(this,_f,_g,_a,_b,_c);return _h;};_pGridTextArea.on_destroy_contents=function(){nexacro.TextAreaCtrl.prototype.on_destroy_contents.call(this);this._grid=null;this._cellinfo=null;this._cellobj=null;};_pGridTextArea.on_apply_custom_setfocus=function(_a,_b){if(this._grid._onceTime_focus&&!_b){nexacro.OnceCallbackTimer.callonce(this,function(){this.on_apply_custom_setfocus(_a,true);},0);return;}return nexacro.TextAreaCtrl.prototype.on_apply_custom_setfocus.call(this,_a);};_pGridTextArea._setAccessibilityStatFocus=function(){var _a=this._cellobj;var _b=_a._getAccessibilityMakeAddLabel();var _c="";var _d=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_d){if(_d._bindexpr&&_d._bindexpr.length>0){_c=this._cellinfo._getAttrValue(_d,this._rowidx);_d._setValue(_c);}_c=this._getAccessibilityLabel(_d);}else{_c=_a._getCellAccessibilityLabel();}_b+=" "+_c;this._setAccessibilityLabel(_b);nexacro.Component.prototype._setAccessibilityStatFocus.call(this);};_pGridTextArea.on_get_style_accessibility_description=function(){if(this._cellobj){return this._cellobj.tooltiptext;}};_pGridTextArea.set_editfilter=function(_a){if(this.editfilter!=_a){this.editfilter=_a;this.on_apply_editfilter(_a);}return _a;};_pGridTextArea.on_apply_editfilter=function(_a){switch(_a){case 'alpha':case 'alpha,number':case 'digit':case 'number':case 'alpha,digit':this.set_inputfilter("none");this.set_inputtype(_a);break;case 'lower':case 'upper':this.set_inputfilter("none");this.set_inputtype("alpha");break;case 'lower,digit':case 'upper,digit':this.set_inputfilter("none");this.set_inputtype("alpha,digit");break;case 'lower,number':case 'upper,number':this.set_inputfilter("none");this.set_inputtype("alpha,number");break;case 'none':this.set_inputfilter("none");this.set_inputtype("normal");break;case 'alpha,number,nosign':case 'lower,number,nosign':case 'upper,number,nosign':this.set_inputfilter("sign");this.set_inputtype("alpha,number");break;case 'char':case 'lower,char':case 'upper,char':this.set_inputfilter("comma,symbol,sign,digit,dot");this.set_inputtype("normal");break;case 'integer':this.set_inputfilter("dot");this.set_inputtype("number");break;case 'digit,char':case 'lower,digit,char':case 'upper,digit,char':this.set_inputfilter("comma,symbol,sign,dot");this.set_inputtype("normal");break;case 'number,char':case 'lower,number,char':case 'upper,number,char':this.set_inputfilter("comma,symbol");this.set_inputtype("normal");break;}if(_a.indexOf("upper")>=0){this.set_inputmode("upper");}else if(_a.indexOf("lower")>=0){this.set_inputmode("lower");}else{this.set_inputmode("normal");}};_pGridTextArea._on_bubble_touchend=function(_a,_b,_c,_d,_e,_f,_g){var _h=true;if(_g){_h=this._cellobj._common_lbuttonup(_c,null,null,null,null);}if(_h){nexacro.TextAreaCtrl.prototype._on_bubble_touchend.call(this,_a,_b,_c,_d,_e,_f,_g);}return true;};_pGridTextArea._on_bubble_lbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_lbuttonup(null,_a,_f,_g,_m);}if(_o){nexacro.TextAreaCtrl.prototype._on_bubble_lbuttonup.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridTextArea._on_bubble_mouseenter=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_mouseenter();}if(_o){nexacro.TextAreaCtrl.prototype._on_bubble_mouseenter.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridTextArea._on_bubble_mouseleave=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_mouseleave();}if(_o){nexacro.TextAreaCtrl.prototype._on_bubble_mouseleave.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridTextArea.on_fire_ontextchange=function(_a){if(this._absolutelyValue==true){return true;}nexacro.TextAreaCtrl.prototype.on_fire_ontextchange.call(this,_a);return this._grid.on_fire_ontextchange(this,_a.chartext,_a.pretext,_a.posttext,_a.preimetext,_a.postimetext);};_pGridTextArea.on_fire_ontextchanged=function(_a,_b,_c){return this._grid.on_fire_ontextchanged(_a,_b,_c);};_pGridTextArea.on_fire_user_ontouchend=function(_a,_b,_c,_d){nexacro.TextAreaCtrl.prototype.on_fire_user_ontouchend.call(this,_a,_b,_c,_d);this._cellobj.on_fire_user_ontouchend(_a,_b,_c,_d);return true;};_pGridTextArea.on_fire_user_onlbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){nexacro.TextAreaCtrl.prototype.on_fire_user_onlbuttonup.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);this._cellobj.on_fire_user_onlbuttonup(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);return true;};_pGridTextArea.on_fire_user_ontouchstart=function(_a,_b,_c,_d){nexacro.TextAreaCtrl.prototype.on_fire_user_ontouchstart.call(this,_a,_b,_c,_d);this._cellobj.on_fire_user_ontouchstart(_a,_b,_c,_d);return true;};_pGridTextArea.on_fire_user_onlbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){nexacro.TextAreaCtrl.prototype.on_fire_user_onlbuttondown.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_user_onlbuttondown(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);return true;};_pGridTextArea.on_fire_oneditclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o){nexacro.TextAreaCtrl.prototype.on_fire_oneditclick.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);this._cellobj.on_fire_onclick(_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o);return true;};_pGridTextArea.on_fire_ondblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(this._displaymode){this.setSelect(0,0);}nexacro.TextAreaCtrl.prototype.on_fire_ondblclick.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_ondblclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,"control");return true;};if(nexacro.Browser=="Gecko"||nexacro.Browser=="Opera"){_pGridTextArea._on_click=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){if(!this._is_alive){return;}var _j=this.visible;if(this._displaymode){_j=true;}var _k="";if(_a instanceof nexacro.InputElement){var _l,_m;if(_a.align){_l=_a.align._halign;_m=_a.align._valign;}else if(_a.halign&&_a.valign){_l=_a.halign;_m=_a.valign;}_k=this._cellobj._getClickItem(_l,_m,_f,_g,_a.text,this);}if(!_k){_k="control";}if(_j&&this._isEnable()&&this.enableevent){var _n=this.getCaretPos();var _o=this._getClientXY(_f,_g);this.on_fire_oneditclick(this,_n,_b,_c,_d,_e,_h,_i,_f,_g,_o[0],_o[1],this,this,_k);}};}else{_pGridTextArea._on_click=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){if(!this._is_alive){return;}var _j=this.visible;if(this._displaymode&&this._grid.selectchangetype=="up"){_j=true;}var _k="";if(_a instanceof nexacro.InputElement){var _l,_m;if(_a.align){_l=_a.align._halign;_m=_a.align._valign;}else if(_a.halign&&_a.valign){_l=_a.halign;_m=_a.valign;}_k=this._cellobj._getClickItem(_l,_m,_f,_g,_a.text,this);}if(!_k){_k="control";}if(_j&&this._isEnable()&&this.enableevent){var _n=this.getCaretPos();var _o=this._getClientXY(_f,_g);this.on_fire_oneditclick(this,_n,_b,_c,_d,_e,_h,_i,_f,_g,_o[0],_o[1],this,this,_k);}};}_pGridTextArea._on_last_lbuttonup=function(){this._cellobj._on_last_lbuttonup();};_pGridTextArea._on_last_keyup=function(){this._cellobj._on_last_keyup();};_pGridTextArea._on_input_blur=function(_a,_b){var _c=this._grid;var _d=this._edit_base_api;if(_d){var _e=_d._stat_composition.getCurrentStatus();var _f=_d._stat_composition.getData();_c._currentCompositionStatus=_e;_c._currentCompositionData=_f;_d._on_input_blur(_a,_b);}};_pGridTextArea.on_getBindableProperties=function(){if(!this._displaymode){return "value";}};_pGridTextArea._isEnable=function(){return this._grid._enable;};_pGridTextArea._set_absolutelyValue=function(_a){this._absolutelyValue=true;this.set_value(_a);this._absolutelyValue=false;};_pGridTextArea._updateAll=function(){if(this.getElement()){this.on_apply_pseudo(this._pseudo);this._setProperty();}};_pGridTextArea._setProperty=function(){var _a=this._cellinfo;var _b=this._cellobj;var _c=this._grid;var _d=_c._getDataRow(_b._rowidx);var _e;if(this._displaymode==true||this.readonly){_e=_a._getDisplayText(_d);}else{_e=_a._getValue(_d);}this._set_absolutelyValue(_e);_e=_a._getAttrValue(_a.editautoselect,_d);if(_e!=null){this.set_autoselect(_e);}_e=_a._getAttrValue(_a.editautoskip,_d);if(_e!=null){this.set_autoskip(_e);}_e=_a._getAttrValue(_a.editfilter,_d);if(_e!=null){this.set_editfilter(_e);}_e=_a._getAttrValue(_a.editimemode,_d);if(_e!=null){this.set_imemode(_e);}_e=_a._getAttrValue(_a.edituseime,_d);if(_e!=null){this.set_useime(_e);}_e=_a._getAttrValue(_a.editlengthunit,_d);if(_e!=null){this.set_lengthunit(_e);}_e=_a._getAttrValue(_a.editscrollbar,_d);if(_e!=null){this.set_scrollbars(_e);}else{this.set_scrollbars("none");}};_pGridTextArea._EditUpdateAll=function(_a,_b){if(this.getElement()){this._cellinfo=_a;this._cellobj=_b;var _c=this._grid;var _d=_c._getDataRow(_b._rowidx);this._control_pseudo="";this._contents_pseudo="";this.on_apply_pseudo(this._pseudo);this._setProperty();var _e=_a._getWordwrap(_d);this.set_wordwrap(_e);}};_pGridTextArea._setDataset=function(_a,_b){var _c=this._cellobj;var _d=this._cellinfo;var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(_b!=undefined){_f=_b;}var _g=this._edit_base_api;if(_g){if(_g._is_composition()){var _j=_g._stat_composition.getCurrentStatus();var _k=_g._stat_composition.getData();var _l=_g._on_input_compositionend(_k);if(!_l){_g._fire_text_event(_k);}if(nexacro.Browser=="Safari"){if(_j==nexacro.EditBase.Status.CompositionStart){_g._on_input_compositionstart(_k);}else if(_j==nexacro.EditBase.Status.CompositionUpdate){_g._on_input_compositionupdate(_k);}}}}var _h=this.value;var _i=true;if(_d.text._bindtype==1){this._grid._is_async_recreate=_a;this._grid._dsEventOccured=true;var _m={status:""};_d.grid._binddataset._setColumn(_f,_d.text._bindexpr,_h,_m);if(_m.status=="cancolumnchange"){_i=false;}this._grid._dsEventOccured=false;}return _i;};delete _pGridTextArea;nexacro.GridControlMaskEdit=function(_a,_b,_c,_d,_e,_f,_g){nexacro.MaskEditCtrl.call(this,_a,"absolute",_b,_c,_d,_e,null,null,_f);this.tabstop=false;this._controlmode=(_g)?true:false;if(_f._refobj){this._grid=_f._refobj.grid;this._cellinfo=_f._refobj;this._cellobj=_f;}else{this._grid=_f;}this._absolutelyValue=false;};var _pGridMaskEdit=nexacro._createPrototype(nexacro.MaskEditCtrl,nexacro.GridControlMaskEdit);nexacro.GridControlMaskEdit.prototype=_pGridMaskEdit;_pGridMaskEdit.on_find_CurrentStyle_align=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){if(this._displaymode){if(_a!="disabled"){_a="normal";}}var _d=this._find_pseudo_obj("align",_a,"align");return _d;}return null;};_pGridMaskEdit.set_mask=function(_a,_b){if(!this._displaymode){_a=_a.replace(/0|9/g,"#");return nexacro.MaskEditCtrl.prototype.set_mask.call(this,_a,_b);}return nexacro.MaskEditCtrl.prototype.set_mask.call(this,_a,_b);};_pGridMaskEdit.on_find_CurrentStyle_font=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){if(this._displaymode){if(_a!="disabled"){_a="normal";}}var _d=this._find_inherit_pseudo_obj("font",_a);if(!_d){_d=_c.on_find_CurrentStyle_font(_a);}return _d;}return null;};_pGridMaskEdit.on_find_CurrentStyle_color=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){if(this._displaymode){if(_a!="disabled"){_a="normal";}}var _d=this._find_inherit_pseudo_obj("color",_a);if(!_d){_d=_c.on_find_CurrentStyle_color(_a);}return _d;}return null;};_pGridMaskEdit.on_find_CurrentStyle_accessibility=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("accessibility",_a,"accessibility");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_accessibility(_f,_a);}return _d;}return null;};_pGridMaskEdit.on_find_CurrentStyle_background=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("background",_a,"background");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_background(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridMaskEdit.on_find_CurrentStyle_border=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("border",_a,"border");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_border(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridMaskEdit.on_find_CurrentStyle_bordertype=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("bordertype",_a,"bordertype");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);return _d;}return null;};_pGridMaskEdit.on_find_CurrentStyle_gradation=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("gradation",_a,"gradation");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_gradation(_f,_c._curDisplayType,_a);}return _d;}return null;};_pGridMaskEdit._makeCssRefInfo=function(){return (this._grid._makeCssRefInfoCtrl(this));};_pGridMaskEdit._find_pseudo_obj=function(_a,_b,_c){var _d=this._cellinfo;var _e=this._grid;var _f=_e._getDataRow(this._cellobj._rowidx);if(this._cellobj&&this._grid._isFakeCell(_f)&&_b!="disabled"){_b="normal";}_f=_e._getDataRow(this._cellobj._rowidx);var _g="control"+_a;var _h=_d._query_pseudo_control(this,_f,_g,_a,_b,_c);return _h;};_pGridMaskEdit.on_destroy_contents=function(){nexacro.MaskEditCtrl.prototype.on_destroy_contents.call(this);this._grid=null;this._cellinfo=null;this._cellobj=null;};_pGridMaskEdit.on_apply_custom_setfocus=function(_a,_b){if(this._grid._onceTime_focus&&!_b){nexacro.OnceCallbackTimer.callonce(this,function(){this.on_apply_custom_setfocus(_a,true);},0);return;}return nexacro.MaskEditCtrl.prototype.on_apply_custom_setfocus.call(this,_a);};_pGridMaskEdit._setAccessibilityStatFocus=function(){var _a=this._cellobj;var _b=_a._getAccessibilityMakeAddLabel();var _c="";var _d=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_d){if(_d._bindexpr&&_d._bindexpr.length>0){_c=this._cellinfo._getAttrValue(_d,this._rowidx);_d._setValue(_c);}_c=this._getAccessibilityLabel(_d);}else{_c=_a._getCellAccessibilityLabel();}_b+=" "+_c;this._setAccessibilityLabel(_b);nexacro.Component.prototype._setAccessibilityStatFocus.call(this);};_pGridMaskEdit.on_get_style_accessibility_description=function(){if(this._cellobj){return this._cellobj.tooltiptext;}};_pGridMaskEdit.on_apply_autoskip=function(){this._grid._moveToCell("next",true);};_pGridMaskEdit._on_bubble_touchend=function(_a,_b,_c,_d,_e,_f,_g){var _h=true;if(_g){_h=this._cellobj._common_lbuttonup(_c,null,null,null,null);}if(_h){nexacro.MaskEditCtrl.prototype._on_bubble_touchend.call(this,_a,_b,_c,_d,_e,_f,_g);}return true;};_pGridMaskEdit._on_bubble_lbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_lbuttonup(null,_a,_f,_g,_m);}if(_o){nexacro.MaskEditCtrl.prototype._on_bubble_lbuttonup.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridMaskEdit._on_bubble_mouseenter=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_mouseenter();}if(_o){nexacro.MaskEditCtrl.prototype._on_bubble_mouseenter.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridMaskEdit._on_bubble_mouseleave=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_mouseleave();}if(_o){nexacro.MaskEditCtrl.prototype._on_bubble_mouseleave.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridMaskEdit.on_fire_ontextchange=function(_a){if(this._absolutelyValue==true){return true;}nexacro.MaskEditCtrl.prototype.on_fire_ontextchange.call(this,_a);return this._grid.on_fire_ontextchange(this,_a.chartext,_a.pretext,_a.posttext,_a.preimetext,_a.postimetext);};_pGridMaskEdit.on_fire_ontextchanged=function(_a,_b,_c){return this._grid.on_fire_ontextchanged(_a,_b,_c);};_pGridMaskEdit.on_fire_user_ontouchend=function(_a,_b,_c,_d){nexacro.MaskEditCtrl.prototype.on_fire_user_ontouchend.call(this,_a,_b,_c,_d);this._cellobj.on_fire_user_ontouchend(_a,_b,_c,_d);return true;};_pGridMaskEdit.on_fire_user_onlbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){nexacro.MaskEditCtrl.prototype.on_fire_user_onlbuttonup.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);this._cellobj.on_fire_user_onlbuttonup(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);return true;};_pGridMaskEdit.on_fire_user_ontouchstart=function(_a,_b,_c,_d){nexacro.MaskEditCtrl.prototype.on_fire_user_ontouchstart.call(this,_a,_b,_c,_d);this._cellobj.on_fire_user_ontouchstart(_a,_b,_c,_d);return true;};_pGridMaskEdit.on_fire_user_onlbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){nexacro.MaskEditCtrl.prototype.on_fire_user_onlbuttondown.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_user_onlbuttondown(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);return true;};_pGridMaskEdit.on_fire_oneditclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o){nexacro.MaskEditCtrl.prototype.on_fire_oneditclick.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);this._cellobj.on_fire_onclick(_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o);return true;};_pGridMaskEdit.on_fire_ondblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(this._displaymode){this.setSelect(0,0);}nexacro.MaskEditCtrl.prototype.on_fire_ondblclick.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_ondblclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,"control");return true;};if(nexacro.Browser=="Gecko"||nexacro.Browser=="Opera"){_pGridMaskEdit._on_click=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){if(!this._is_alive){return;}var _j=this.visible;if(this._displaymode){_j=true;}var _k="";if(_a instanceof nexacro.InputElement){var _l,_m;if(_a.align){_l=_a.align._halign;_m=_a.align._valign;}else if(_a.halign&&_a.valign){_l=_a.halign;_m=_a.valign;}_k=this._cellobj._getClickItem(_l,_m,_f,_g,_a.text,this);}if(!_k){_k="control";}if(_j&&this._isEnable()&&this.enableevent){var _n=this.getCaretPos();var _o=this._getClientXY(_f,_g);this.on_fire_oneditclick(this,_n,_b,_c,_d,_e,_h,_i,_f,_g,_o[0],_o[1],this,this,_k);}};}else{_pGridMaskEdit._on_click=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){if(!this._is_alive){return;}var _j=this.visible;if(this._displaymode&&this._grid.selectchangetype=="up"){_j=true;}var _k="";if(_a instanceof nexacro.InputElement){var _l,_m;if(_a.align){_l=_a.align._halign;_m=_a.align._valign;}else if(_a.halign&&_a.valign){_l=_a.halign;_m=_a.valign;}_k=this._cellobj._getClickItem(_l,_m,_f,_g,_a.text,this);}if(!_k){_k="control";}if(_j&&this._isEnable()&&this.enableevent){var _n=this.getCaretPos();var _o=this._getClientXY(_f,_g);this.on_fire_oneditclick(this,_n,_b,_c,_d,_e,_h,_i,_f,_g,_o[0],_o[1],this,this,_k);}};}_pGridMaskEdit._on_last_lbuttonup=function(){this._cellobj._on_last_lbuttonup();};_pGridMaskEdit._on_last_keyup=function(){this._cellobj._on_last_keyup();};_pGridMaskEdit._isEnable=function(){return this._grid._enable;};_pGridMaskEdit._set_absolutelyValue=function(_a){this._absolutelyValue=true;this.set_value(_a);this._absolutelyValue=false;};_pGridMaskEdit._updateAll=function(){if(this.getElement()){this._setProperty();this.on_apply_pseudo(this._pseudo);}};_pGridMaskEdit._setProperty=function(){var _a=this._cellinfo;var _b=this._cellobj;var _c=this._grid;var _d=_c._getDataRow(_b._rowidx);var _e=_a._getEdittype(_d);var _f=_a._getDisplaytype(_d);var _g=_a._getAttrValue(_a.edittype,_d);var _h=_a._getValue(_d);_h=nexacro._toString(_h);if(_e=="masknumber"){this.set_type("number");this._set_absolutelyValue(_h);}else{if(_g=="normal"){if(_f=="number"){this.set_type("number");}else{this.set_type("string");}}else{this.set_type("string");}this._set_absolutelyValue(_h);}if(_e=="masknumber"||_e=="mask"){_h=_a._getAttrValue(_a.mask,_d);if(_h!=null){this.set_mask(_h);}}_h=_a.maskchar;if(_h!=null){this.set_maskchar(_h);}_h=_a._getAttrValue(_a.editautoselect,_d);if(_h!=null){this.set_autoselect(_h);}_h=_a._getAttrValue(_a.editautoskip,_d);if(_h!=null){this.set_autoskip(_h);}_h=_a._getAttrValue(_a.editclipmode,_d);if(_h!=null){this.set_clipmode(_h);}_h=_a._getAttrValue(_a.editlimitbymask,_d);if(_h!=null){this.set_limitbymask(_h);}_h=_a._getAttrValue(_a.edittrimtype,_d);if(_h!=null){this.set_trimtype(_h);}};_pGridMaskEdit._EditUpdateAll=function(_a,_b){if(this.getElement()){this._cellinfo=_a;this._cellobj=_b;this._control_pseudo="";this._contents_pseudo="";this.on_apply_pseudo(this._pseudo);this._setProperty();}};_pGridMaskEdit._setDataset=function(_a,_b){var _c=this._cellobj;var _d=this._cellinfo;var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);var _g=this.value;if(_b!=undefined){_f=_b;}var _h=true;if(_d.text._bindtype==1){this._grid._is_async_recreate=_a;this._grid._dsEventOccured=true;var _i={status:""};_d.grid._binddataset._setColumn(_f,_d.text._bindexpr,_g,_i);if(_i.status=="cancolumnchange"){_h=false;}this._grid._dsEventOccured=false;}return _h;};delete _pGridMaskEdit;nexacro.GridControlCalendar=function(_a,_b,_c,_d,_e,_f,_g,_h){nexacro.CalendarCtrl.call(this,_a,"absolute",_b,_c,_d,_e,null,null,_f);this.tabstop=false;this.ondropdown="grid";this._displaymode=(_g)?true:false;this._controlmode=(_h)?true:false;if(_f._refobj){this._grid=_f._refobj.grid;this._cellinfo=_f._refobj;this._cellobj=_f;}else{this._grid=_f;}};var _pGridCalendar=nexacro._createPrototype(nexacro.CalendarCtrl,nexacro.GridControlCalendar);nexacro.GridControlCalendar.prototype=_pGridCalendar;_pGridCalendar.on_find_CurrentStyle_align=function(_a,_b){var _c=this._cellinfo;var _d=this._cellobj;if(_c&&_d){if(this._displaymode){if(_a!="disabled"){_a="normal";}}var _e=this._find_pseudo_obj("align",_a,"align",_b);return _e;}return null;};_pGridCalendar.on_find_CurrentStyle_font=function(_a,_b){var _c=this._cellinfo;var _d=this._cellobj;if(_c&&_d){var _e=this._find_pseudo_obj("font",_a,"font",_b);var _f=this._grid;var _g=_f._getDataRow(_d._rowidx);if(!_e){_e=_d.on_find_CurrentStyle_font(_a);}return _e;}return null;};_pGridCalendar.on_find_CurrentStyle_color=function(_a,_b){var _c=this._cellinfo;var _d=this._cellobj;if(_c&&_d){var _e=this._find_pseudo_obj("color",_a,"color",_b);var _f=this._grid;var _g=_f._getDataRow(_d._rowidx);if(!_e){_e=_d.on_find_CurrentStyle_color(_a);}return _e;}return null;};_pGridCalendar.on_find_CurrentStyle_accessibility=function(_a,_b){var _c=this._cellinfo;var _d=this._cellobj;if(_c&&_d){var _e=this._find_pseudo_obj("accessibility",_a,"accessibility",_b);var _f=this._grid;var _g=_f._getDataRow(_d._rowidx);if(!_e){_e=_c._query_pseudo_accessibility(_g,_a);}return _e;}return null;};_pGridCalendar._makeCssRefInfo=function(){return (this._grid._makeCssRefInfoCtrl(this));};_pGridCalendar._find_pseudo_obj=function(_a,_b,_c,_d){var _e=this._cellinfo;if(this._displaymode==true){if(_b!="disabled"){_b="normal";}}var _f;if(_a=="dayborder"||_a=="daybordertype"||_a=="daybackground"||_a=="daycolor"||_a=="dayfont"||_a=="daygradation"){_f=nexacro.CalendarCtrl.prototype._find_pseudo_obj.call(this,_a,_b,_c);if(_f){return _f;}}var _g=this._grid;var _h=_g._getDataRow(this._cellobj._rowidx);var _i="control"+_a;var _f=_e._query_pseudo_control(this,_h,_i,_a,_b,_c,_d);return _f;};_pGridCalendar.on_created_contents=function(){nexacro.CalendarCtrl.prototype.on_created_contents.call(this);if(this._displaymode){this.calendaredit._input_element.setElementReadonly(true);}};_pGridCalendar.on_destroy_contents=function(){nexacro.CalendarCtrl.prototype.on_destroy_contents.call(this);this._grid=null;this._cellinfo=null;this._cellobj=null;};_pGridCalendar._setAccessibilityStatFocus=function(){var _a=this._cellobj;var _b=_a._getAccessibilityMakeAddLabel();var _c="";var _d=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_d){if(_d._bindexpr&&_d._bindexpr.length>0){_c=this._cellinfo._getAttrValue(_d,this._rowidx);_d._setValue(_c);}_c=this._getAccessibilityLabel(_d);}else{_c=_a._getCellAccessibilityLabel();}_c=(_c!=_a._display_text)?_c:"";_b+=" "+_c;this._setAccessibilityLabel(_b);nexacro.Component.prototype._setAccessibilityStatFocus.call(this);};_pGridCalendar.on_get_style_accessibility_description=function(){if(this._cellobj){return this._cellobj.tooltiptext;}};_pGridCalendar.set_innerdataset=function(_a){var _b=nexacro.CalendarCtrl.prototype.set_innerdataset.call(this,_a);if(this._controlmode){var _c=this._grid;if(_c){for(var _d=0;_d<_c.getCellCount("body");_d++ ){_c.setCellProperty("body",_d,"calendarinnerdataset",_a);}}}return _b;};_pGridCalendar.set_backgroundcolumn=function(_a){nexacro.CalendarCtrl.prototype.set_backgroundcolumn.call(this,_a);if(this._controlmode){var _b=this._grid;if(_b){for(var _c=0;_c<_b.getCellCount("body");_c++ ){_b.setCellProperty("body",_c,"calendarbackgroundcolumn",_a);}}}};_pGridCalendar.set_bordercolumn=function(_a){nexacro.CalendarCtrl.prototype.set_bordercolumn.call(this,_a);if(this._controlmode){var _b=this._grid;if(_b){for(var _c=0;_c<_b.getCellCount("body");_c++ ){_b.setCellProperty("body",_c,"calendarbordercolumn",_a);}}}};_pGridCalendar.set_datecolumn=function(_a){nexacro.CalendarCtrl.prototype.set_datecolumn.call(this,_a);if(this._controlmode){var _b=this._grid;if(_b){for(var _c=0;_c<_b.getCellCount("body");_c++ ){_b.setCellProperty("body",_c,"calendardatecolumn",_a);}}}};_pGridCalendar.set_textcolorcolumn=function(_a){nexacro.CalendarCtrl.prototype.set_textcolorcolumn.call(this,_a);if(this._controlmode){var _b=this._grid;if(_b){var _c=null;for(var _d=0;_d<_b.getCellCount("body");_d++ ){_b.setCellProperty("body",_d,"calendartextcolorcolumn",_a);}}}};_pGridCalendar.on_apply_custom_setfocus=function(_a){if(!this._displaymode){return nexacro.Calendar.prototype.on_apply_custom_setfocus.call(this,_a);}};_pGridCalendar._on_bubble_touchend=function(_a,_b,_c,_d,_e,_f,_g){var _h=true;if(_g){_h=this._cellobj._common_lbuttonup(_c,null,null,null,null);}if(_h){nexacro.CalendarCtrl.prototype._on_bubble_touchend.call(this,_a,_b,_c,_d,_e,_f,_g);}return true;};_pGridCalendar._on_bubble_lbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_lbuttonup(null,_a,_f,_g,_m);}if(_o){nexacro.CalendarCtrl.prototype._on_bubble_lbuttonup.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridCalendar._on_bubble_mouseenter=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_mouseenter();}if(_o){nexacro.CalendarCtrl.prototype._on_bubble_mouseenter.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridCalendar._on_bubble_mouseleave=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_mouseleave();}if(_o){nexacro.CalendarCtrl.prototype._on_bubble_mouseleave.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridCalendar.on_notify_ondropdown=function(_a,_b){if(!this._displaymode){return (nexacro.CalendarCtrl.prototype.on_notify_ondropdown.call(this,_a,_b));}};_pGridCalendar.on_notify_mobile_ondropdown=function(_a,_b){if(!this._displaymode){return nexacro.CalendarCtrl.prototype.on_notify_mobile_ondropdown.call(this,_a,_b);}};_pGridCalendar.on_notify_onkeydown=function(_a,_b){var _c=this._grid;if(_b.keycode==nexacro.Event.KEY_DOWN&&_b.altKey){_c._is_editor_keyaction=false;}if(!_a._displaymode){return (nexacro.CalendarCtrl.prototype.on_notify_onkeydown.call(this,_a,_b));}};_pGridCalendar.on_fire_ontextchange=function(_a,_b,_c,_d,_e,_f){return this._grid.on_fire_ontextchange(this,_b,_c,_d,_e,_f);};_pGridCalendar.on_fire_ontextchanged=function(_a,_b,_c){return this._grid.on_fire_ontextchanged(_a,_b,_c);};_pGridCalendar.on_fire_onchanged=function(_a,_b,_c,_d,_e){if(!_a._displaymode){if(this._grid.autoupdatetype=="dateselect"||this._grid.autoupdatetype=="itemselect"){this._setDataset(true,undefined,false);}return (nexacro.CalendarCtrl.prototype.on_fire_onchanged.call(this,_a,_b,_c,_d,_e));}};_pGridCalendar.on_fire_oncloseup=function(_a,_b,_c,_d,_e,_f){this._grid.on_fire_oncloseup(_a,_b,_c,_d,_e,_f);};_pGridCalendar.on_fire_ondropdown=function(_a){this._grid.on_fire_ondropdown(_a);};_pGridCalendar.on_fire_user_ontouchend=function(_a,_b,_c,_d){var _e=nexacro._getFirstTouchInfo(_b);if(this._isSubCell){_e.canvasX-=_d._adjust_left;_e.canvasY-=_d._adjust_top;_e.clientX-=_d._adjust_left;_e.clientY-=_d._adjust_top;}nexacro.CalendarCtrl.prototype.on_fire_user_ontouchend.call(this,_a,_b,_c,_d);this._cellobj.on_fire_user_ontouchend(_a,_b,_c,_d);return true;};_pGridCalendar.on_fire_user_onlbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){if(_l!=this){_g-=_l._adjust_left;_i-=_l._adjust_left;_h-=_l._adjust_top;_j-=_l._adjust_top;}nexacro.CalendarCtrl.prototype.on_fire_user_onlbuttonup.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);this._cellobj.on_fire_user_onlbuttonup(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);return true;};_pGridCalendar.on_fire_user_ontouchstart=function(_a,_b,_c,_d){var _e=nexacro._getFirstTouchInfo(_b);if(this._isSubCell){_e.canvasX-=_d._adjust_left;_e.canvasY-=_d._adjust_top;_e.clientX-=_d._adjust_left;_e.clientY-=_d._adjust_top;}nexacro.CalendarCtrl.prototype.on_fire_user_ontouchstart.call(this,_a,_b,_c,_d);this._cellobj.on_fire_user_ontouchstart(_a,_b,_c,_d);return true;};_pGridCalendar.on_fire_user_onlbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(_l!=this){_g-=_l._adjust_left;_i-=_l._adjust_left;_h-=_l._adjust_top;_j-=_l._adjust_top;}nexacro.CalendarCtrl.prototype.on_fire_user_onlbuttondown.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_user_onlbuttondown(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);return true;};_pGridCalendar.on_fire_sys_onkeydown=function(_a,_b,_c,_d,_e,_f){var _g=nexacro.CalendarCtrl.prototype.on_fire_sys_onkeydown.call(this,_a,_b,_c,_d,_e,_f);if(this._isPopupVisible()){this._grid._is_editor_keyaction=false;}else{this._grid._is_editor_keyaction=true;}return _g;};_pGridCalendar.on_fire_onclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){nexacro.CalendarCtrl.prototype.on_fire_onclick.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_onclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,this,_l,"control");return true;};_pGridCalendar.on_fire_ondblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(this._displaymode){this.setSelect(0,0);}nexacro.CalendarCtrl.prototype.on_fire_ondblclick.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_ondblclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,this,_l,"control");return true;};_pGridCalendar.on_notify_oneditclick=function(_a,_b){var _c="";if(_b.fromobject instanceof nexacro.CalendarEditCtrl){var _h=_b.fromobject._input_element;var _i,_j;if(_h.align){_i=_h.align._halign;_j=_h.align._valign;}else if(_h.halign&&_h.valign){_i=_h.halign;_j=_h.valign;}_c=this._cellobj._getClickItem(_i,_j,_b.canvasX,_b.canvasY,_h.text,_b.fromobject);}if(!_c){_c="control";}var _d=this._cellobj.currentstyle.padding;var _e=_b.canvasX+(_d?_d.left:0);var _f=_b.canvasY+(_d?_d.top:0);var _g=this._getClientXY(_e,_f);return this._cellobj.on_fire_onclick(_b.button,_b.alt_key,_b.ctrl_key,_b.shift_key,_b.screenX,_b.screenY,_e,_f,_g[0],_g[1],_b.fromobject,_b.fromreferenceobject,_c);};_pGridCalendar.on_lbuttondown_basic_action=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){var _n=nexacro.Component.prototype.on_lbuttondown_basic_action.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);if(this._isPopupVisible()&&this==_l){this._closePopup();}return _n;};_pGridCalendar._on_click=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){if(!this._is_alive){return;}var _j=this.visible;if(this._displaymode&&this._grid.selectchangetype=="up"){_j=true;}if(_j&&this._isEnable()&&this.enableevent){var _k=this._getClientXY(_f,_g);this.on_fire_onclick(_b,_c,_d,_e,_h,_i,_f,_g,_k[0],_k[1],this,this,"control");}};_pGridCalendar._on_last_lbuttonup=function(){this._cellobj._on_last_lbuttonup();};_pGridCalendar._on_last_keyup=function(){this._cellobj._on_last_keyup();};_pGridCalendar.on_getBindableProperties=function(){if(!this._displaymode){return "value";}};_pGridCalendar._isEnable=function(){return this._grid._enable;};_pGridCalendar._getDisplayText=function(){if(this.parent){return this.parent._getDisplayText();}return "";};_pGridCalendar._updateAll=function(){if(this.getElement()){this.on_apply_pseudo(this._pseudo);this._setProperty();}};_pGridCalendar._setProperty=function(){var _a=this._cellinfo;var _b=this._cellobj;var _c=this._grid;var _d=_c._getDataRow(_b._rowidx);var _e=_a._getAttrValue(_a.mask,_d);if(!_e||_e.length==0){_e="yyyy-MM-dd";}if(_e!=null){this.set_editformat(_e);this.set_dateformat(_e);}var _e=org_v=_a._getValue(_d);if(this._displaymode==true&&!_e){_e=_a._getDisplayText(_d);_e=this._makeNormalValue1(_e);}_e=this._toValueStr(_e);this.set_value(_e,true);_e=_a._getAttrValue(_a.editautoselect,_d);if(_e!=null){this.set_autoselect(_e);}if(this._isTimeMask()==true){this.set_type("spin");}else{this.set_type("normal");}if(_c.locale){this.set_locale(_c.locale);}var _f=_a._getAttrValue(_a.calendardisplay,_d);if(_f=="display"){_e=_a._getAttrValue(_a.calendardisplaynulltext,_d);if(_e!=null){this.set_displaynulltext(_e);}}var _g=_a._getAttrValue(_a.calendardisplaynulltype,_d);if(_g!="default"&&(nexacro._isNull(org_v)||org_v==="")){if(_g=="nulltext"){this.set_dateformat("");}else{if(_g=="nullmask"){_e=this._toValueStr(null);this.set_value(_e,true);}else{this.set_dateformat("");}this.set_displaynulltext("");}}var _h=_a._getAttrValue(_a.calendarinnerdataset,_d);if(_h){this.set_innerdataset(_h);}var _i=_a._getAttrValue(_a.calendarbackgroundcolumn,_d);if(_i){this.set_backgroundcolumn(_i);}var _j=_a._getAttrValue(_a.calendarbordercolumn,_d);if(_j){this.set_bordercolumn(_j);}var _k=_a._getAttrValue(_a.calendardatecolumn,_d);if(_k){this.set_datecolumn(_k);}var _l=_a._getAttrValue(_a.calendartextcolorcolumn,_d);if(_l){this.set_textcolorcolumn(_l);}};_pGridCalendar._EditUpdateAll=function(_a,_b){if(this.getElement()){this._cellinfo=_a;this._cellobj=_b;this._setProperty();this._control_pseudo="";this._contents_pseudo="";this.on_apply_pseudo(this._pseudo);}};_pGridCalendar._setDataset=function(_a,_b,_c){var _d=this._cellobj;var _e=this._cellinfo;var _f=this._grid;var _g=_f._getDataRow(_d._rowidx);if(_c==undefined){_c=true;}this._setValueCtrl(_c);var _h=this.value;if(_b!=undefined){_g=_b;}var _i=true;if(_e.text._bindtype==1){this._grid._is_async_recreate=_a;this._grid._dsEventOccured=true;var _j={status:""};_e.grid._binddataset._setColumn(_g,_e.text._bindexpr,_h,_j);if(_j.status=="cancolumnchange"){this._setValue(undefined);_i=false;}this._grid._dsEventOccured=false;}return _i;};delete _pGridCalendar;nexacro.GridControlCombo=function(_a,_b,_c,_d,_e,_f,_g,_h){nexacro.ComboCtrl.call(this,_a,"absolute",_b,_c,_d,_e,null,null,_f);this.tabstop=false;if(_g){this._displaymode=true;this.readonly=true;}else{this._displaymode=false;}this._controlmode=(_h)?true:false;if(_f._refobj){this._grid=_f._refobj.grid;this._cellinfo=_f._refobj;this._cellobj=_f;}else{this._grid=_f;}};var _pGridCombo=nexacro._createPrototype(nexacro.ComboCtrl,nexacro.GridControlCombo);nexacro.GridControlCombo.prototype=_pGridCombo;_pGridCombo.on_find_CurrentStyle_align=function(_a,_b){var _c=this._cellinfo;var _d=this._cellobj;if(_c&&_d){if(this._displaymode){if(_a!="disabled"){_a="normal";}}var _e=this._find_pseudo_obj("align",_a,"align",_b);return _e;}return null;};_pGridCombo.on_find_CurrentStyle_font=function(_a,_b){var _c=this._cellinfo;var _d=this._cellobj;if(_c&&_d){var _e=this._find_pseudo_obj("font",_a,"font",_b);var _f=this._grid;var _g=_f._getDataRow(_d._rowidx);if(!_e){_e=_d.on_find_CurrentStyle_font(_a);}return _e;}return null;};_pGridCombo.on_find_CurrentStyle_color=function(_a,_b){var _c=this._cellinfo;var _d=this._cellobj;if(_c&&_d){var _e=this._find_pseudo_obj("color",_a,"color",_b);var _f=this._grid;var _g=_f._getDataRow(_d._rowidx);if(!_e){_e=_d.on_find_CurrentStyle_color(_a);}return _e;}return null;};_pGridCombo.on_find_CurrentStyle_accessibility=function(_a,_b){var _c=this._cellinfo;var _d=this._cellobj;if(_c&&_d){var _e=this._find_pseudo_obj("accessibility",_a,"accessibility",_b);var _f=this._grid;var _g=_f._getDataRow(_d._rowidx);if(!_e){_e=_c._query_pseudo_accessibility(_g,_a);}return _e;}return null;};_pGridCombo.on_find_CurrentStyle_background=function(_a,_b){var _c=this._cellinfo;var _d=this._cellobj;if(_c&&_d){var _e=this._find_pseudo_obj("background",_a,"background",_b);var _f=this._grid;var _g=_f._getDataRow(_d._rowidx);if(!_e){_e=_d.on_find_CurrentStyle_background(_a);}return _e;}return null;};_pGridCombo.on_find_CurrentStyle_bordertype=function(_a,_b){var _c=this._cellinfo;var _d=this._cellobj;if(_c&&_d){var _e=this._find_pseudo_obj("bordertype",_a,"bordertype",_b);var _f=this._grid;var _g=_f._getDataRow(_d._rowidx);return _e;}return null;};_pGridCombo.on_find_CurrentStyle_gradation=function(_a,_b){var _c=this._cellinfo;var _d=this._cellobj;if(_c&&_d){var _e=this._find_pseudo_obj("gradation",_a,"gradation",_b);var _f=this._grid;var _g=_f._getDataRow(_d._rowidx);if(!_e){_e=_c._query_pseudo_gradation(_g,_d._curDisplayType,_a);}return _e;}return null;};_pGridCombo._makeCssRefInfo=function(){return (this._grid._makeCssRefInfoCtrl(this));};_pGridCombo._find_pseudo_obj=function(_a,_b,_c,_d){var _e=this._cellinfo;if(this._displaymode==true){if(_b!="disabled"){_b="normal";}}var _f=this._grid;var _g=_f._getDataRow(this._cellobj._rowidx);var _h="control"+_a;var _i=_e._query_pseudo_control(this,_g,_h,_a,_b,_c,_d);return _i;};_pGridCombo.on_destroy_contents=function(){nexacro.ComboCtrl.prototype.on_destroy_contents.call(this);this._grid=null;this._cellinfo=null;this._cellobj=null;};_pGridCombo._setAccessibilityStatFocus=function(){var _a=this._cellobj;var _b=_a._getAccessibilityMakeAddLabel();var _c="";var _d=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_d){if(_d._bindexpr&&_d._bindexpr.length>0){_c=this._cellinfo._getAttrValue(_d,this._rowidx);_d._setValue(_c);}_c=this._getAccessibilityLabel(_d);}else{_c=_a._getCellAccessibilityLabel();}_c=(_c!=_a._display_text)?_c:"";_b+=" "+_c;this._setAccessibilityLabel(_b);nexacro.Component.prototype._setAccessibilityStatFocus.call(this);};_pGridCombo.on_get_style_accessibility_description=function(){if(this._cellobj){return this._cellobj.tooltiptext;}};_pGridCombo._on_bubble_touchend=function(_a,_b,_c,_d,_e,_f,_g){var _h=true;if(_g){_h=this._cellobj._common_lbuttonup(_c,null,null,null,null);}if(_h){nexacro.ComboCtrl.prototype._on_bubble_touchend.call(this,_a,_b,_c,_d,_e,_f,_g);}return true;};_pGridCombo._on_bubble_lbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_lbuttonup(null,_a,_f,_g,_m);}if(_o){nexacro.ComboCtrl.prototype._on_bubble_lbuttonup.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridCombo._on_bubble_mouseenter=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_mouseenter();}if(_o){nexacro.ComboCtrl.prototype._on_bubble_mouseenter.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridCombo._on_bubble_mouseleave=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_mouseleave();}if(_o){nexacro.ComboCtrl.prototype._on_bubble_mouseleave.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridCombo.on_fire_oncloseup=function(_a,_b,_c,_d,_e,_f,_g,_h){nexacro.ComboCtrl.prototype.on_fire_oncloseup.call(this,_a,_b,_c,_d,_e,_f,_g,_h);this._grid.on_fire_oncloseup(_a,_c,_f,_d,_g,_h);};_pGridCombo.on_fire_user_onkeydown=function(_a,_b,_c,_d,_e,_f){var _g=this._grid;if(_a==nexacro.Event.KEY_DOWN||_a==nexacro.Event.KEY_UP||(_a==nexacro.Event.KEY_DOWN&&_b)){_g._is_editor_keyaction=false;}nexacro.ComboCtrl.prototype.on_fire_user_onkeydown.call(this,_a,_b,_c,_d,_e,_f);if(!this._displaymode){return this._cellobj.on_fire_user_onkeydown(_a,_b,_c,_d,_e,_f);}};_pGridCombo.on_fire_sys_onmousewheel=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){if(!this._displaymode){return nexacro.ComboCtrl.prototype.on_fire_sys_onmousewheel.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);};};_pGridCombo.on_fire_ondropdown=function(_a){return this._grid.on_fire_ondropdown(_a);};_pGridCombo.on_fire_user_ontouchend=function(_a,_b,_c,_d){var _e=nexacro._getFirstTouchInfo(_b);if(this._isSubCell){_e.canvasX-=_d._adjust_left;_e.canvasY-=_d._adjust_top;_e.clientX-=_d._adjust_left;_e.clientY-=_d._adjust_top;}nexacro.ComboCtrl.prototype.on_fire_user_ontouchend.call(this,_a,_b,_c,_d);this._cellobj.on_fire_user_ontouchend(_a,_b,_c,_d);return true;};_pGridCombo.on_fire_user_onlbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){if(_l!=this){_g-=_l._adjust_left;_i-=_l._adjust_left;_h-=_l._adjust_top;_j-=_l._adjust_top;}nexacro.ComboCtrl.prototype.on_fire_user_onlbuttonup.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);this._cellobj.on_fire_user_onlbuttonup(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);return true;};_pGridCombo.on_fire_user_ontouchstart=function(_a,_b,_c,_d){var _e=nexacro._getFirstTouchInfo(_b);if(this._isSubCell){_e.canvasX-=_d._adjust_left;_e.canvasY-=_d._adjust_top;_e.clientX-=_d._adjust_left;_e.clientY-=_d._adjust_top;}nexacro.ComboCtrl.prototype.on_fire_user_ontouchstart.call(this,_a,_b,_c,_d);this._cellobj.on_fire_user_ontouchstart(_a,_b,_c,_d);return true;};_pGridCombo.on_fire_user_onlbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(_l!=this){_g-=_l._adjust_left;_i-=_l._adjust_left;_h-=_l._adjust_top;_j-=_l._adjust_top;}nexacro.ComboCtrl.prototype.on_fire_user_onlbuttondown.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_user_onlbuttondown(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);return true;};_pGridCombo.on_fire_onclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){nexacro.ComboCtrl.prototype.on_fire_onclick.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_onclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,this,_l,"control");return true;};_pGridCombo.on_fire_ondblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(this._displaymode){this.setSelect(0,0);}nexacro.ComboCtrl.prototype.on_fire_ondblclick.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);this._cellobj.on_fire_ondblclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,this,_l,"control");return true;};_pGridCombo.on_fire_ontextchange=function(_a,_b){if(_b.pretext!=_b.posttext){this._text_change=true;}return this._grid.on_fire_ontextchange(this,_b.chartext,_b.pretext,_b.posttext,_b.preimetext,_b.postimetext);};_pGridCombo.on_fire_ontextchanged=function(_a,_b){this.on_combo_text_changed(_b.pretext,_b.posttext);return this._grid.on_fire_ontextchanged(_a,_b.pretext,_b.posttext);};_pGridCombo.on_fire_onitemchanged=function(_a,_b,_c,_d,_e,_f,_g){if(!_a._displaymode){if(this._grid.autoupdatetype=="comboselect"||this._grid.autoupdatetype=="itemselect"){this._setDataset(true);}return (nexacro.ComboCtrl.prototype.on_fire_onitemchanged.call(this,_a,_b,_c,_d,_e,_f,_g));}};_pGridCombo.on_notify_edit_oneditclick=function(_a,_b){var _c="";if(_b.fromobject instanceof nexacro.ComboEditCtrl){var _h=_b.fromobject._input_element;var _i,_j;if(_h.align){_i=_h.align._halign;_j=_h.align._valign;}else if(_h.halign&&_h.valign){_i=_h.halign;_j=_h.valign;}_c=this._cellobj._getClickItem(_i,_j,_b.canvasX,_b.canvasY,_h.text,_b.fromobject);}if(!_c){_c="control";}var _d=this._cellobj.currentstyle.padding;var _e=_b.canvasX+(_d?_d.left:0);var _f=_b.canvasY+(_d?_d.top:0);var _g=this._getClientXY(_e,_f);return this._cellobj.on_fire_onclick(_b.button,_b.alt_key,_b.ctrl_key,_b.shift_key,_b.screenX,_b.screenY,_e,_f,_g[0],_g[1],_b.fromobject,_b.fromreferenceobject,_c);};_pGridCombo.on_lbuttondown_basic_action=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){var _n=nexacro.Component.prototype.on_lbuttondown_basic_action.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);if(this._isPopupVisible()&&this==_l){this._closePopup();}return _n;};_pGridCombo._on_click=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){if(!this._is_alive){return;}var _j=this.visible;if(this._displaymode&&this._grid.selectchangetype=="up"){_j=true;}if(_j&&this._isEnable()&&this.enableevent){var _k=this._getClientXY(_f,_g);this.on_fire_onclick(_b,_c,_d,_e,_h,_i,_f,_g,_k[0],_k[1],this,this);}};_pGridCombo._on_last_lbuttonup=function(){this._cellobj._on_last_lbuttonup();};_pGridCombo._on_last_keyup=function(){this._cellobj._on_last_keyup();};_pGridCombo._callback_onvaluechanged=function(_a,_b){if(!this._displaymode){this._recheckValue();this._is_recheck=true;}};_pGridCombo.on_getBindableProperties=function(){if(!this._displaymode){return "value";}};_pGridCombo._isEnable=function(){return this._grid._enable;};_pGridCombo._updateAll=function(){if(this.getElement()){this.on_apply_pseudo(this._pseudo);this._setProperty();}};_pGridCombo._setProperty=function(){var _a=this._cellinfo,_b=this._cellobj,_c=this._grid;var _d=_c._getDataRow(_b._rowidx);var _e=_a._getEdittype(_d);var _f=_a._getAttrValue(_a.combodataset,_d);if(_f&&_f.length){this.set_innerdataset(_f);}var _g=_a._getAttrValue(_a.combodatacol,_d);if(_g&&_g.length){this.set_datacolumn(_g);}var _h=_a._getAttrValue(_a.combocodecol,_d);if(_h&&_h.length){this.set_codecolumn(_h);}var _i=_a._getAttrValue(_a.combodisplayrowcount,_d);if(_i){this.set_displayrowcount(_i);}var _j=_a._getAttrValue(_a.combotype,_d);if(_j){this.set_type(_j);}var _k;if(this._displaymode==true){_k=_a._getDisplayText(_d);this.set_text(_k);}else{_k=_a._getValue(_d);this.set_value(_k);}_k=_a._getAttrValue(_a.editautoselect,_d);if(_k!=null){this.set_autoselect(_k);}var _l=_a._getAttrValue(_a.combodisplay,_d);if(_l=="display"){_k=_a._getAttrValue(_a.combodisplaynulltext,_d);if(_k!=null){this.set_displaynulltext(_k);}}};_pGridCombo._EditUpdateAll=function(_a,_b){if(this.getElement()){this._cellinfo=_a;this._cellobj=_b;this._control_pseudo="";this._contents_pseudo="";this.on_apply_pseudo(this._pseudo);this._setProperty();}};_pGridCombo._setDataset=function(_a,_b){var _c=this._cellobj;var _d=this._cellinfo;var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);var _g=this.value;if(_b!=undefined){_f=_b;}var _h=true;if(_d.text._bindtype==1){if(this._prevalue!=this.value){this._grid._is_async_recreate=_a;this._grid._dsEventOccured=true;var _i={status:""};_d.grid._binddataset._setColumn(_f,_d.text._bindexpr,_g,_i);if(_i.status=="cancolumnchange"){this.set_value(undefined);_h=false;}this._grid._dsEventOccured=false;}}return _h;};delete _pGridCombo;nexacro.GridCellCheckbox=function(_a,_b,_c,_d,_e,_f){nexacro.CheckBoxCtrl.call(this,_a,"absolute",_b,_c,_d,_e,null,null,_f);this.tabstop=false;this._is_usetextbox=false;var _g=_f;while(_g){if(_g._type_name=="GridCell"){this._cellobj=_g;this._cellinfo=_g._refobj;this._grid=_g._refobj.grid;break;}_g=_g.parent;}this.checked=false;};var _pGridCellCheckbox=nexacro._createPrototype(nexacro.CheckBoxCtrl,nexacro.GridCellCheckbox);nexacro.GridCellCheckbox.prototype=_pGridCellCheckbox;_pGridCellCheckbox.on_find_CurrentStyle_font=function(){};_pGridCellCheckbox.on_find_CurrentStyle_color=function(){};_pGridCellCheckbox.on_find_CurrentStyle_align=function(){};_pGridCellCheckbox.on_find_CurrentStyle_border=function(){};_pGridCellCheckbox.on_find_CurrentStyle_bordertype=function(){};_pGridCellCheckbox.on_find_CurrentStyle_background=function(){};_pGridCellCheckbox.on_find_CurrentStyle_gradation=function(){};_pGridCellCheckbox.on_find_CurrentStyle_padding=function(){};_pGridCellCheckbox.on_find_CurrentStyle_focusborder=function(){};_pGridCellCheckbox.on_find_CurrentStyle_moveeffect=function(){};_pGridCellCheckbox.on_find_CurrentStyle_shadow=function(){};_pGridCellCheckbox.on_find_CurrentStyle_textpadding=function(){};_pGridCellCheckbox.on_update_style_background=function(){};_pGridCellCheckbox.on_update_style_border=function(){};_pGridCellCheckbox.on_update_style_bordertype=function(){};_pGridCellCheckbox.on_update_style_gradation=function(){};_pGridCellCheckbox.on_update_style_font=function(){};_pGridCellCheckbox.on_update_style_padding=function(){};_pGridCellCheckbox.on_update_style_shadow=function(){};_pGridCellCheckbox.on_update_style_padding=function(){};_pGridCellCheckbox.on_update_style_align=function(){};_pGridCellCheckbox.on_update_style_cursor=function(){};_pGridCellCheckbox.on_update_style_color=function(){};_pGridCellCheckbox.on_create_contents=function(){nexacro.CheckBoxCtrl.prototype.on_create_contents.call(this);this.chkimg.on_apply_custom_setfocus=function(){};this.chkimg._on_last_lbuttonup=function(){this.parent._on_last_lbuttonup();};this.chkimg._on_last_keyup=function(){this.parent._on_last_keyup();};};_pGridCellCheckbox.on_apply_custom_setfocus=function(_a,_b){};_pGridCellCheckbox.on_apply_style_buttonalign=function(){var _a;if(this.currentstyle.buttonsize==null){_a=14;}else{_a=parseInt(this.currentstyle.buttonsize._value,10);}this.resize(_a,_a);};_pGridCellCheckbox._makeCssRefInfo=function(){return (this._grid._makeCssRefInfoCtrl(this));};_pGridCellCheckbox._styleProp=[["buttonbackground","background"],["buttonborder","border"],["buttonbordertype","bordertype"],["buttongradation","gradation"],["buttonimage","image"]];_pGridCellCheckbox._getStyleProp=function(_a){var _b=this._styleProp;var _c=_b.length;for(var _d=0;_d<_c;_d++ ){if(_b[_d][0]==_a){return _b[_d][1];}}return _a;};_pGridCellCheckbox.on_get_style_accessibility_label=function(){return "";};_pGridCellCheckbox.on_find_CurrentStyle_cursor=function(_a){var _b=this._grid;if(_b._global_cursor){return _b._global_cursor;}var _c=this._find_pseudo_obj("cursor",_a)||this._cellobj.on_find_CurrentStyle_cursor(_a);return (_c)?_c:nexacro.Component._default_cursor;};_pGridCellCheckbox._find_pseudo_obj=function(_a,_b,_c){var _d=this._cellinfo;var _e=this._grid;var _f=_e._getDataRow(this._cellobj._rowidx);if(this._cellobj&&this._grid._isFakeCell(_f)&&_b!="disabled"){_b="normal";}var _g="control"+this._getStyleProp(_a);var _h=_d._query_pseudo_control(this,_f,_g,_a,_b,_c);return _h;};_pGridCellCheckbox.on_created_contents=function(){nexacro.CheckBoxCtrl.prototype.on_created_contents.call(this);var _a=this._cellobj.currentstyle.align;if(_a){this._setAlign(_a.halign,_a.valign);}};_pGridCellCheckbox.on_destroy_contents=function(){nexacro.CheckBoxCtrl.prototype.on_destroy_contents.call(this);this._grid=null;this._cellinfo=null;this._cellobj=null;};_pGridCellCheckbox.on_change_containerRect=function(){var _a=this._grid._getAvailableRect(this);var _b=_a.height;this.chkimg.move(0,0,_b,_b);};_pGridCellCheckbox._setAccessibilityStatFocus=function(){var _a=this._cellobj;var _b=_a._getAccessibilityMakeAddLabel();var _c="";var _d=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_d){if(_d._bindexpr&&_d._bindexpr.length>0){_c=this._cellinfo._getAttrValue(_d,this._rowidx);_d._setValue(_c);}_c=this._getAccessibilityLabel(_d);}else{_c=_a._getCellAccessibilityLabel();}_b+=" "+_c;this._setAccessibilityLabel(_b);this._setAccessibilityStatChecked(this.isChecked());_a._setAccessibilityStatChecked(this.isChecked());nexacro.Component.prototype._setAccessibilityStatFocus.call(this);};_pGridCellCheckbox.on_get_style_accessibility_description=function(){if(this._cellobj){return this._cellobj.tooltiptext;}};_pGridCellCheckbox.on_notify_checkbox_onkeydown=function(_a,_b){};_pGridCellCheckbox.on_fire_onclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){return this.parent.on_fire_onclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,"control");};_pGridCellCheckbox.on_fire_ondblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){return this.parent.on_fire_ondblclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,"control");};_pGridCellCheckbox._on_last_lbuttonup=function(){this._cellobj._on_last_lbuttonup();};_pGridCellCheckbox._on_last_keyup=function(){this._cellobj._on_last_keyup();};_pGridCellCheckbox._isEnable=function(){return this._grid._enable;};_pGridCellCheckbox._setAlign=function(_a,_b){var _c=this._grid._getAvailableRect(this.parent);var _d=_c.right;var _e=_c.bottom;;var _f=_c.width;var _g=_c.height;var _h;if(this.currentstyle.buttonsize==null){_h=14;}else{_h=parseInt(this.currentstyle.buttonsize._value,10);}if(!_a){_a="center";}if(!_b){_b="middle";}var _i=0;var _j=0;if(_a=="center"){_i=Math.round((_f-_h)/2);}else if(_a=="right"){_i=_d-_h;}if(_b=="middle"){_j=Math.round((_g-_h)/2);}else if(_b=="bottom"){_j=_e-_h;}this.move(_i,_j,_h,_h);};_pGridCellCheckbox._updateAll=function(){if(this.getElement()){this._setProperty();this.on_apply_pseudo(this._pseudo);this.set_value(this.checked);}};_pGridCellCheckbox._setProperty=function(){var _a=this._cellinfo;var _b=this._cellobj;var _c=this._grid;var _d=_c._getDataRow(_b._rowidx);var _e=_a._getDisplayText(_d);_e=nexacro._toString(_e);if(_e!=null){this._display_text=_e;this.set_text(_e);}else{this._display_text="";this.set_text("");}};delete _pGridCellCheckbox;nexacro.GridControlCheckbox=function(_a,_b,_c,_d,_e,_f,_g){nexacro.GridCellCheckbox.call(this,_a,_b,_c,_d,_e,_f);this._controlmode=(_g)?true:false;};var _pGridCheckbox=nexacro._createPrototype(nexacro.GridCellCheckbox,nexacro.GridControlCheckbox);nexacro.GridControlCheckbox.prototype=_pGridCheckbox;_pGridCheckbox.on_apply_text=function(){var _a=this._display_text;this.checked=(_a==null)?false:nexacro._toBoolean(_a);};_pGridCheckbox._common_fire_lbuttondown=function(_a){var _b=this._grid;if(_b){var _c=_b._getDataRow(this._cellobj._rowidx);if(_b._isFakeCell(_c)){return false;}}};_pGridCheckbox.on_fire_user_ontouchstart=function(_a,_b,_c,_d){this._common_fire_lbuttondown();return this._cellobj.on_fire_user_ontouchstart(_a,_b,_c,_d);};_pGridCheckbox.on_fire_user_onlbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){this._common_fire_lbuttondown();return this._cellobj.on_fire_user_onlbuttondown(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);};_pGridCheckbox.on_fire_user_ontouchend=function(_a,_b,_c,_d){nexacro.GridCellCheckbox.prototype.on_fire_user_ontouchend.call(this,_a,_b,_c,_d);this._cellobj.on_fire_user_ontouchend(_a,_b,_c,_d);return true;};_pGridCheckbox.on_fire_user_onlbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){nexacro.GridCellCheckbox.prototype.on_fire_user_onlbuttonup.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);this._cellobj.on_fire_user_onlbuttonup(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);return true;};_pGridCheckbox.on_fire_onclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){var _m=this._grid;if(_m){var _n=_m._getDataRow(this._cellobj._rowidx);if(_m._isFakeCell(_n)){return false;}}if(_m.selectchangetype!="down"){if(nexacro._toBoolean(_m.readonly)==false){this._toggleCheck();}}if(!this._is_alive){return;}return this._cellobj.on_fire_onclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,"control");};_pGridCheckbox.on_fire_ondblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){var _m=this._grid;if(_m){var _n=_m._getDataRow(this._cellobj._rowidx);if(_m._isFakeCell(_n)){return false;}}return this._cellobj.on_fire_ondblclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,"control");};_pGridCheckbox._toggleCheck=function(){var _a=this._cellobj;var _b=this._cellinfo;var _c=this._grid;var _d=_c._getDataRow(_a._rowidx);var _e=_b._getEdittype(_d);if(_e=="checkbox"){var _f=nexacro._toBoolean(this.value);_f=(_f)?0:1;if(_b.text._bindtype==1){_c._dsEventOccured=true;if(_b.grid._binddataset.setColumn(_d,_b.text._bindexpr,_f)){_f=this._getDisplayText();this.set_value(_f);}if(_c){_c._dsEventOccured=false;}}}};_pGridCheckbox._getDisplayText=function(){if(this.parent){return this.parent._getDisplayText();}return "";};_pGridCheckbox._on_bubble_mouseenter=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_mouseenter();}if(_o){nexacro.GridCellCheckbox.prototype._on_bubble_mouseenter.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};_pGridCheckbox._on_bubble_mouseleave=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=true;if(_n){_o=this._cellobj._common_mouseleave();}if(_o){nexacro.GridCellCheckbox.prototype._on_bubble_mouseleave.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n);}return true;};delete _pGridCheckbox;nexacro.GridControlImage=function(_a,_b,_c,_d,_e,_f){nexacro.Component.call(this,_a,"absolute",_b,_c,_d,_e,null,null,_f);this.tabstop=false;this._is_subcontrol=true;if(_f._refobj){this._grid=_f._refobj.grid;this._cellinfo=_f._refobj;this._cellobj=_f;}this._img_elem=null;this._img_type="url";};var _pGridImage=nexacro._createPrototype(nexacro.Component,nexacro.GridControlImage);nexacro.GridControlImage.prototype=_pGridImage;_pGridImage._type_name="GridControlImage";_pGridImage.imagewidth=0;_pGridImage.imageheight=0;_pGridImage.on_find_CurrentStyle_accessibility=function(_a){var _b=this._cellinfo;var _c=this._cellobj;if(_b&&_c){var _d=this._find_pseudo_obj("accessibility",_a,"accessibility");var _e=this._grid;var _f=_e._getDataRow(_c._rowidx);if(!_d){_d=_b._query_pseudo_accessibility(_f,_a);}return _d;}return null;};_pGridImage.on_find_CurrentStyle_background=function(_a){return this._find_pseudo_obj("background",_a,"background");};_pGridImage.on_find_CurrentStyle_border=function(_a){return this._find_pseudo_obj("border",_a,"border");};_pGridImage.on_find_CurrentStyle_bordertype=function(_a){return this._find_pseudo_obj("bordertype",_a,"bordertype");};_pGridImage.on_find_CurrentStyle_gradation=function(_a){return this._find_pseudo_obj("gradation",_a,"gradation");};_pGridImage.on_find_CurrentStyle_padding=function(_a){return this._find_pseudo_obj("padding",_a,"padding");};_pGridImage.on_find_CurrentStyle_opacity=function(_a){return this._find_pseudo_obj("opacity",_a);};_pGridImage.on_find_CurrentStyle_cursor=function(_a){var _b=this._grid;if(_b._global_cursor){return _b._global_cursor;}var _c=this._find_pseudo_obj("cursor",_a)||this._cellobj.on_find_CurrentStyle_cursor(_a);return (_c)?_c:nexacro.Component._default_cursor;};_pGridImage.on_find_CurrentStyle_shadow=function(_a){return null;};_pGridImage.on_find_CurrentStyle_font=function(_a){return this._find_inherit_pseudo_obj("font",_a,"font");};_pGridImage.on_find_CurrentStyle_color=function(_a){return this._find_inherit_pseudo_obj("color",_a,"color");};_pGridImage.on_find_CurrentStyle_align=function(_a){return this.parent.on_find_CurrentStyle_align(_a);};_pGridImage._makeCssRefInfo=function(){return (this._grid._makeCssRefInfoCtrl(this));};_pGridImage._find_pseudo_obj=function(_a,_b,_c){var _d=this._cellinfo;var _e=this._grid;var _f=_e._getDataRow(this._cellobj._rowidx);if(this._cellobj&&this._grid._isFakeCell(_f)&&_b!="disabled"){_b="normal";}_f=_e._getDataRow(this._cellobj._rowidx);var _g="control"+_a;var _h=_d._query_pseudo_control(this,_f,_g,_a,_b,_c);return _h;};_pGridImage.on_created_contents=function(){if(this._img_elem){this._img_elem.create();}};_pGridImage.on_destroy_contents=function(){this._grid=null;this._cellinfo=null;this._cellobj=null;if(this._img_elem){this._img_elem.destroy();this._img_elem=null;}};_pGridImage._setAccessibilityStatFocus=function(){var _a=this._cellobj;var _b=_a._getAccessibilityMakeAddLabel();var _c="";var _d=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_d){if(_d._bindexpr&&_d._bindexpr.length>0){_c=this._cellinfo._getAttrValue(_d,this._rowidx);_d._setValue(_c);}_c=this._getAccessibilityLabel(_d);}else{_c=_a._getCellAccessibilityLabel();}_b+=" "+_c;this._setAccessibilityLabel(_b);nexacro.Component.prototype._setAccessibilityStatFocus.call(this);};_pGridImage.on_get_style_accessibility_label=function(){return (this.text)?this.text:this.id;};_pGridImage.on_get_style_accessibility_description=function(){if(this._cellobj){return this._cellobj.tooltiptext;}};_pGridImage.on_apply_text=function(){this._load_image(this._display_text);};_pGridImage.on_fire_onclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){return this.parent.on_fire_onclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,"image");};_pGridImage.on_fire_user_ontouchstart=function(_a,_b,_c,_d){return this.parent.on_fire_user_ontouchstart(_a,_b,this,_d);};_pGridImage.on_fire_user_onlbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){return this.parent.on_fire_user_onlbuttondown(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,this,_l);};_pGridImage.on_fire_user_ontouchend=function(_a,_b,_c,_d){return this.parent.on_fire_user_ontouchend(_a,_b,this,_d);};_pGridImage.on_fire_user_onlbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){return this.parent.on_fire_user_onlbuttonup(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,this,_l,_m);};_pGridImage.on_fire_user_onkeydown=function(_a,_b,_c,_d,_e,_f){return this.parent.on_fire_user_onkeydown(_a,_b,_c,_d,this,_f);};_pGridImage.on_fire_user_onkeyup=function(_a,_b,_c,_d,_e,_f){return this.parent.on_fire_user_onkeyup(_a,_b,_c,_d,this,_f);};_pGridImage.on_fire_ondblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){return this.parent.on_fire_ondblclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,this,_l,"image");};_pGridImage.on_fire_onsize=function(_a,_b){if(this._complete){this.__apply_text();}return nexacro.Component.prototype.on_fire_onsize.call(this,_a,_b);};_pGridImage._on_last_lbuttonup=function(){this._cellobj._on_last_lbuttonup();};_pGridImage._on_last_keyup=function(){this._cellobj._on_last_keyup();};_pGridImage._isEnable=function(){return this._grid._enable;};_pGridImage._getDisplayText=function(){if(this.parent){return this.parent._getDisplayText();}return "";};_pGridImage._updateAll=function(){this.on_apply_pseudo(this._pseudo);this._setProperty();};_pGridImage._setProperty=function(){var _a=this._cellinfo;var _b=this._cellobj;var _c=this._grid;var _d=_c._getDataRow(_b._rowidx);var _e=_a._getDisplayText(_d);_e=nexacro._toString(_e);if(_e!=null){this.set_text(_e);}else{this.set_text("");}};_pGridImage._adjustAlign=function(_a,_b){if(!_a){_a="center";}if(!_b){_b="middle";}var _c=this._grid._getAvailableRect(this.parent);var _d=_c.width;var _e=_c.height;var _f=_c.right;var _g=_c.bottom;var _h=0;var _i=0;var _j=this._img_elem;var _k=this.imagewidth;var _l=this.imageheight;if(_a=="center"){_h=Math.round((_d-_k)/2);}else if(_a=="right"){_h=_f-_k;}if(_b=="middle"){_i=Math.round((_e-_l)/2);}else if(_b=="bottom"){_i=_g-_l;}this.move(_h,_i,_k,_l);if(_j){_j.setElementSize(_k,_l);}};_pGridImage._on_loadImg=function(_a,_b,_c){if(!this._is_alive||!this._img_elem){return;}if(this._img_type=="url"){this._img_elem.setElementImageUrl(_a);}else{this._img_elem.setElementImageBase64(_a);}this.imagewidth=_b;this.imageheight=_c;var _d=this.on_find_CurrentStyle_align(this._pseudo);if(_d){this._adjustAlign(_d.halign,_d.valign);}else{this._adjustAlign();}};_pGridImage._load_image=function(_a){var _b=this.getElement();var _c="";var _d="url";if(_a){_c=_a.toString();var _e=nexacro._checkBase64String(_c);if(_e){_d="base64";if(_c.substring(0,10).toLowerCase()=="data:image"){if(_c.substring(0,17).toLowerCase()!="data:image;base64"){var _f=_c.indexOf(",");if(_f> -1){var _g=_c.slice(_f+1,_c.legnth);_c="data:image;base64,"+_g;}}}else{_c="data:image;base64,"+_c;}}}if(_c&&_b){var _h=this._img_elem;var _i=false;if(!_h){this._img_elem=_h=new nexacro.ImageElement(_b);_i=true;}if(!_h._handle){_h.create();}if(_d=="url"){_c=nexacro._getURIValue(_c);_c=nexacro._getImageLocation(_c,this._getRefFormBaseUrl());}this._img_type=_d;var _j=nexacro._getImageSize(_c,this._on_loadImg,this);if(_j){this.imagewidth=_j.width;this.imageheight=_j.height;if(_d=="url"){_h.setElementImageUrl(_c);}else{_h.setElementImageBase64(_c);}}var _k=this.on_find_CurrentStyle_align(this._pseudo);this._adjustAlign(_k.halign,_k.valign);if(_i){if(this._is_created){_h.create();}}if(this.imagewidth>0&&this.imageheight>0){_h.setElementSize(this.imagewidth,this.imageheight);}}else{if(this._img_elem){this._img_elem.destroy();this.imagewidth=0;this.imageheight=0;this._img_elem=null;}}};delete _pGridImage;nexacro.GridSelectorButtonCtrl=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k){nexacro.TrackImageButtonCtrl.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_j);this._parent=_i;this._band=_i._band;this._grid=_j;this._idx=_k;this._point={x:0,y:0,w:0,h:0};this._minibox=null;this._minibox_size=8;this._minibox_wgap=0;this._minibox_hgap=0;};var _pGridSelectorButtonCtrl=nexacro.GridSelectorButtonCtrl.prototype=nexacro._createPrototype(nexacro.TrackImageButtonCtrl,nexacro.GridSelectorButtonCtrl);_pGridSelectorButtonCtrl._type_name="GridSelectorButtonControl";_pGridSelectorButtonCtrl.on_find_CurrentStyle_background=function(_a){};_pGridSelectorButtonCtrl.on_find_CurrentStyle_border=function(_a){};_pGridSelectorButtonCtrl.on_find_CurrentStyle_image=function(_a){return this._grid.on_find_CurrentStyle_selectpointimage(_a);};_pGridSelectorButtonCtrl.on_apply_style_image=function(_a){nexacro.TrackImageButtonCtrl.prototype.on_apply_style_image.call(this);this._updateMiniBox();};_pGridSelectorButtonCtrl._on_loadImg=function(_a,_b,_c){if(!this._is_alive){return;}this._image_width=_b;this._image_height=_c;this._updateMiniBox();};_pGridSelectorButtonCtrl._load_image=function(_a){var _b=_a?_a._value:"";if(_b){if(_b.substring(0,4).toLowerCase()=="url("){_b=_b.substring(5,_b.length-2);}_b=nexacro._getImageLocation(_b,this._getRefFormBaseUrl());var _d=nexacro._getImageSize(_b,this._on_loadImg,this);if(_d){this._on_loadImg(_b,_d.width,_d.height);}}var _c=nexacro.TrackImageButtonCtrl.prototype._load_image.call(this,_a);return _c;};_pGridSelectorButtonCtrl._updateMiniBox=function(){if(!this.currentstyle.image||!this._image_width||!this._image_height){var _a=(this._adjust_height-this._minibox_size)/2;this._minibox_wgap=_a;this._minibox_hgap=_a;if(!this._minibox){this._minibox=new nexacro.Component("minibox","absolute",_a,_a,this._minibox_size,this._minibox_size,null,null,this);this._minibox._is_simple_control=true;this._minibox._is_track=true;this._minibox._on_starttrack=function(){return this.parent._on_starttrack();};this._minibox._on_movetrack=function(_a,_b,_c){return this.parent._on_movetrack(_a,_b,_c);};this._minibox._on_endtrack=function(_a,_b,_c){return this.parent._on_endtrack(_a,_b,_c);};this._minibox.on_find_CurrentStyle_border=function(_b){return nexacro._getCachedStyleObj("border","1 solid black");};this._minibox.on_find_CurrentStyle_background=function(_b){return this.parent._band._find_pseudo_obj("selectbackground","normal","background","body");};this._minibox.createComponent();}else{this._minibox.move(_a,_a,this._minibox_size,this._minibox_size);}}else{if(this._minibox){this._minibox.destroy();this._minibox=null;}if(this._img_elem){this._minibox_wgap=(this._adjust_width-this._image_width)/2;this._minibox_hgap=(this._adjust_height-this._image_height)/2;if(this._minibox_wgap<0){this._minibox_wgap=0;}if(this._minibox_hgap<0){this._minibox_hgap=0;}}}};_pGridSelectorButtonCtrl.on_fire_onsize=function(_a,_b){this._updateMiniBox();};_pGridSelectorButtonCtrl.on_create_contents=function(){nexacro.TrackImageButtonCtrl.prototype.on_create_contents.call(this);this._updateMiniBox();};_pGridSelectorButtonCtrl.on_created_contents=function(){nexacro.TrackImageButtonCtrl.prototype.on_created_contents.call(this);if(this._minibox){this._minibox.on_created();}};_pGridSelectorButtonCtrl.on_destroy_contents=function(){this._parent=null;this._band=null;this._grid=null;this._minibox=null;nexacro.TrackImageButtonCtrl.prototype.on_destroy_contents.call(this);};_pGridSelectorButtonCtrl._on_starttrack=function(){var _a=this._parent;_a._is_tracking=true;_a._track_reset_scroll=false;_a._track_up_scroll=false;var _b=this._grid._getScrollTop();var _c=this._grid._getScrollLeft();this._point.hgap=0;this._point.wgap=0;this._point.scrolltop=_b;this._point.scrollleft=_c;this._point.x=_a._area_pos.l;this._point.y=_a._area_pos.t;this._point.w=_a._area_pos.w;this._point.h=_a._area_pos.h;var _d=end_row=start_col=end_col= -1;var _e=this._grid._selectinfo.area;if(_e.length>0){var _f=_e[_e.length-1];_d=_f.begrow;end_row=_f.endrow;start_col=_f.begrow;end_col=_f.endrow;if(this._idx!=_a._pre_idx){var _g=this._grid._selectinfo.areainfo;var _h=this._grid._selectinfo.ctrlpoint;var _i;if(_g){var _j=this._grid._curFormat;var _k=_j._bodyrows.length;if(this._idx==0){_i=_j._bodycells[_g.ecell];_h._set(_i,_g.erow,_k);}else if(this._idx==1){_i=_j._bodycells[_g.scell];_h._set(_i,_g.srow,_k);}else if(this._idx==2){_i=_j._bodycells[_g.ecell];_h._set(_i,_g.srow,_k);}else if(this._idx==3){_i=_j._bodycells[_g.scell];_h._set(_i,_g.erow,_k);}}}}if(this._grid._fixed_rowcnt>0){var _l=this._grid._getHeadHeight();var _m=this._grid._fixed_height;var _n=_l+_m;if(_d>=this._grid._fixed_startrow&&_d<=this._grid._fixed_endrow){this._point.y=_a._area_pos.t+=this._point.scrolltop;if(end_row>this._grid._fixed_endrow&&_b>0){if(_a._end_scroll_top>=0){this._point.h=_a._area_pos.h-=_b;}}}}_a.set_visible(true);_a._trackbar[0].set_visible(false);_a._trackbar[1].set_visible(false);_a._trackbar[2].set_visible(false);_a._trackbar[3].set_visible(false);_a._start_begarea=this._grid._selectinfo.arearect.barea;_a._start_endarea=this._grid._selectinfo.arearect.earea;if(this._idx==0){this._area=_a._start_begarea;}else{this._area=_a._start_endarea;}this._grid._track_mode="areaselect";_a._callback_start.call(this._grid,_a._area_pos,this._idx);};_pGridSelectorButtonCtrl._on_movetrack=function(_a,_b,_c){var _d=this._parent;var _e=this._grid._getScrollTop();var _f=this._grid._getScrollLeft();var _g=scroll_left_gap=0;if(_d._start_scroll_top>=0){_g=_d._start_scroll_top-_e;}if(_d._start_scroll_left>=0){scroll_left_gap=_d._start_scroll_left-_f;}var _h=this._grid._selectinfo.ctrlpoint.row;var _i=true;if(this._grid._fixed_rowcnt>0&&_h>=this._grid._fixed_startrow&&_h<=this._grid._fixed_endrow){_i=false;}if(this._idx==0){var _m=this._point.x+_a;var _n=this._point.y+_b;var _o=this._point.w-_a+scroll_left_gap;var _p=this._point.h-_b+(_i?_g:0);}else if(this._idx==1){var _m=this._point.x+scroll_left_gap;var _n=this._point.y+(_i?_g:0);var _o=this._point.w+_a-scroll_left_gap;var _p=this._point.h+_b-(_i?_g:0);}else if(this._idx==2){var _m=this._point.x+_a;var _n=this._point.y;var _o=this._point.w-_a;var _p=this._point.h+_b;}else if(this._idx==3){var _m=this._point.x;var _n=this._point.y+_b;var _o=this._point.w+_a;var _p=this._point.h-_b;}var _j=this._grid._selectinfo.area;if(this._grid._fixed_rowcnt>0&&_j.length){var _q=this._grid.currentstyle.border;var _r=(_q)?parseInt(_q.right_width,10):0;var _s=this._grid._getHeadHeight();var _t=this._grid._fixed_rowcnt;var _u=this._grid._fixed_height;var _v=_s+_u+_r;var _w=_j[_j.length-1];var _x=_w.begrow;var _y=_w.endrow;var _z=this._grid._selectinfo.ctrlpoint;var _aa=_z.row;var _ab=_z.col;var _q=this._grid.currentstyle.border;var _r=(_q)?parseInt(_q.right_width,10):0;var _ac=this._grid._fixed_startrow;var _ad=this._grid._fixed_endrow;var _ae=this._grid.vscrollbar;if((_n+_p)<_v){_d._track_reset_scroll=true;}if(_y>_ad){_d._track_up_scroll=true;}if(_d._track_reset_scroll&&_x<=_ad&&_e>0&&(_n+_p)>=_v){_ae.set_pos(0);_d._track_reset_scroll=false;}else if(_d._track_up_scroll&&_z.row<=_ad&&_e>0&&(_n+_p)<=(_v)){_ae.set_pos(_ae.pos-1);}else if(_z.row>_ad&&_e>0&&_n<=_v){_ae.set_pos(_ae.pos-1);}}var _k=_d._setAreaPos(_m,_n,_o,_p,true,this._idx);var _l=false;_d._adjust_scroll=false;if(_k[0]!=""||_k[1]!=""){var _af;if(_d._onlyarea){_af=_d._curarea;}var _ag=_d._area_pos.l;var _ah=_d._area_pos.t;var _ai=_d._area_pos.w;var _aj=_d._area_pos.h;_l=_d._callback_scroll.call(this._grid,_k,_af);_d._area_pos.l=_ag;_d._area_pos.t=_ah;_d._area_pos.w=_ai;_d._area_pos.h=_aj;}if(_l){if(_k[1]=="bottomover1"||_k[1]=="topover0"){}if(_k[0]=="rightover1"||_k[0]=="leftover0"){}}_d._callback.call(this._grid,_d._area_pos,this._idx,true);};_pGridSelectorButtonCtrl._on_endtrack=function(_a,_b,_c){var _d=this._parent;_d._is_tracking=false;_d._adjust_scroll=true;_d.set_visible(false);_d._trackbar[0].set_visible(true);_d._trackbar[1].set_visible(true);_d._start_begarea=this._grid._selectinfo.arearect.barea;_d._start_endarea=this._grid._selectinfo.arearect.earea;if(this._idx==0){this._area=_d._start_begarea;}else{this._area=_d._start_endarea;}_d._end_scroll_top=this._grid._getScrollTop();_d._end_scroll_left=this._grid._getScrollLeft();_d._pre_idx=this._idx;var _e=this._grid._selectinfo.area;if(this._grid._fixed_rowcnt>0&&_e.length){var _f=_e[_e.length-1];var _g=_f.endrow;var _h=this._grid._fixed_endrow;if(_g>_h){_d._track_up_scroll=true;}else{_d._track_up_scroll=false;}}this._grid._track_mode="";this._grid._updateSelector();};delete _pGridSelectorButtonCtrl;nexacro.GridSelector=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){nexacro.Component.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i);this._is_simple_control=true;this._is_subcontrol=true;this._callback_start=null;this._callback=null;this._callback_scroll=null;this._trackbar=[];this._grid=_i;this._band=_i._bodyBand;this._area_pos={l:0,t:0,w:0,h:0,empty:true};this._curarea="";this._onlyarea=false;this._start_begarea="";this._start_endarea="";this._start_scroll_top= -1;this._start_scroll_left= -1;this._end_scroll_top= -1;this._end_scroll_left= -1;this._pre_idx= -1;};var _pGridSelector=nexacro._createPrototype(nexacro.Component,nexacro.GridSelector);nexacro.GridSelector.prototype=_pGridSelector;_pGridSelector._type_name="GridSelector";_pGridSelector._trackbar_size=22;_pGridSelector.on_find_CurrentStyle_background=function(_a){return null;};_pGridSelector.on_find_CurrentStyle_border=function(_a){return null;};_pGridSelector.on_find_CurrentStyle_opacity=function(_a){return null;};_pGridSelector.on_create_contents=function(){};_pGridSelector.on_created_contents=function(){if(this._trackbar[0]){this._trackbar[0].on_created();this._trackbar[1].on_created();this._trackbar[2].on_created();this._trackbar[3].on_created();}};_pGridSelector.on_destroy_contents=function(){this._trackbar[0].destroy();this._trackbar[1].destroy();this._trackbar[0]=null;this._trackbar[1]=null;this._trackbar[2]=null;this._trackbar[3]=null;this._trackbar=null;this._band=null;this._grid=null;};_pGridSelector.on_find_CurrentStyle_border=function(_a){return null;};_pGridSelector._createButton=function(){if(!this._trackbar[0]){this._trackbar[0]=new nexacro.GridSelectorButtonCtrl("selectortrackbar1","absolute",0,0,0,0,null,null,this,this.parent,0);this._trackbar[0].createComponent();this._trackbar[1]=new nexacro.GridSelectorButtonCtrl("selectortrackbar2","absolute",0,0,0,0,null,null,this,this.parent,1);this._trackbar[1].createComponent();this._trackbar[2]=new nexacro.GridSelectorButtonCtrl("selectortrackbar3","absolute",0,0,0,0,null,null,this,this.parent,2);this._trackbar[2].createComponent();this._trackbar[3]=new nexacro.GridSelectorButtonCtrl("selectortrackbar4","absolute",0,0,0,0,null,null,this,this.parent,3);this._trackbar[3].createComponent();this._trackbar[0]._no_slide_scroll=true;this._trackbar[1]._no_slide_scroll=true;this._trackbar[2]._no_slide_scroll=true;this._trackbar[3]._no_slide_scroll=true;this._recalcarea();}};_pGridSelector._updateAll=function(){if(this._trackbar[0]){this._trackbar[0].on_apply_custom_pseudo(this._trackbar[0]._pseudo);this._trackbar[1].on_apply_custom_pseudo(this._trackbar[1]._pseudo);this._trackbar[2].on_apply_custom_pseudo(this._trackbar[2]._pseudo);this._trackbar[3].on_apply_custom_pseudo(this._trackbar[3]._pseudo);}};_pGridSelector._recalcarea=function(_a){if(!this._trackbar[0]){return;}if(this._area_pos.empty){this._trackbar[0].set_visible(false);this._trackbar[1].set_visible(false);this._trackbar[2].set_visible(false);this._trackbar[3].set_visible(false);return;}if(_a!="hscroll"&&_a!="vscroll"){this.__showbutton(false);}var _b=this._trackbar_size;var _c=_b/2;var _d=this._grid;var _e=_d._curFormat;var _f=_e.leftWidth;var _g=_d._client_width-_e.rightWidth;var _h,_i,_j,_k;var _l,_m,_n,_o;var _p;_j=this._band._adjust_top;_k=this._band._getPosBottom();_h=[];_i=[];if(this._start_begarea=="left"){_h[0]=0;_i[0]=_f;}else if(this._start_begarea=="right"){_h[0]=_g;_i[0]=_d._client_width;}else{_h[0]=_f;_i[0]=_g;}if(this._start_endarea=="left"){_h[1]=0;_i[1]=_f;}else if(this._start_endarea=="right"){_h[1]=_g;_i[1]=_d._client_width;}else{_h[1]=_f;_i[1]=_g;}var _q=this._grid.currentstyle.border;var _r=(_q)?parseInt(_q.right_width,10):0;var _s=this._grid._getHeadHeight();var _t=this._grid._fixed_height;var _u=_s+_t+_r;var _v=this._grid._fixed_startrow;var _w=this._grid._fixed_endrow;var _x=this._grid._fixed_rowcnt;var _y=[false,false,false,false];var _z=this._grid._scroll_top;if(_x){var _ad=this._grid._selectinfo.area;var _ae,_af;if(_ad.length>0){_ae=_ad[_ad.length-1].begrow;_af=_ad[_ad.length-1].endrow;if(_ae<=(_v+_x)){_y[0]=_y[3]=true;}if(_af<=(_v+_x)){_y[1]=_y[2]=true;}}}_p=_y[0]?_z:0;_l=this._area_pos.l-_c;_m=this._area_pos.t-_c+_p;_n=_l+_b;_o=_m+_b;this._trackbar[0].move(_l,_m,_b,_b);var _aa=this._trackbar[0]._minibox_wgap;var _ab=this._trackbar[0]._minibox_hgap;var _ac=_d._find_lastFocused();if(_ac==_d){if(_n-_aa<_h[0]||_o-_ab<_j||_l+_aa>_i[0]||_m+_ab>_k||_m+_ab<_t){this._trackbar[0].visible=_y[0]||false;}else{this._trackbar[0].visible=true;}}else{this._trackbar[0].visible=false;}_p=_y[1]?_z:0;_l=this._area_pos.l+this._area_pos.w-_c;_m=this._area_pos.t+this._area_pos.h-_c+_p;_n=_l+_b;_o=_m+_b;this._trackbar[1].move(_l,_m,_b,_b);if(_ac==_d){if(_n-_aa<_h[1]||_o-_ab<_j||_l+_aa>_i[1]||_m+_ab>_k||_m+_ab<_t){this._trackbar[1].visible=_y[1]||false;}else{this._trackbar[1].visible=true;}}else{this._trackbar[1].visible=false;}_p=_y[2]?_z:0;_l=this._area_pos.l-_c;_m=this._area_pos.t+this._area_pos.h-_c+_p;_n=_l+_b;_o=_m+_b;this._trackbar[2].move(_l,_m,_b,_b);if(_ac==_d){if(_n-_aa<_h[0]||_o-_ab<_j||_l+_aa>_i[0]||_m+_ab>_k||_m+_ab<_t){this._trackbar[2].visible=false;}}_p=_y[3]?_z:0;_l=this._area_pos.l+this._area_pos.w-_c;_m=this._area_pos.t-_c+_p;_n=_l+_b;_o=_m+_b;this._trackbar[3].move(_l,_m,_b,_b);if(_ac==_d){if(_n-_aa<_h[1]||_o-_ab<_j||_l+_aa>_i[1]||_m+_ab>_k||_m+_ab<_t){this._trackbar[3].visible=false;}}this.__showbutton(true);};if(nexacro.OS=="Android"&&(nexacro.Browser=="Safari"||nexacro.Browser=="MobileSafari")){_pGridSelector.__showbutton=function(_a){if(this._trackbar[0]){if(!_a){this._trackbar[0]._control_element.setElementVisible(false);this._trackbar[1]._control_element.setElementVisible(false);this._trackbar[2]._control_element.setElementVisible(false);this._trackbar[3]._control_element.setElementVisible(false);}else{nexacro.OnceCallbackTimer.callonce(this,function(){this._trackbar[0]._control_element.setElementVisible(this._trackbar[0].visible);this._trackbar[1]._control_element.setElementVisible(this._trackbar[1].visible);},10);}}};}else{_pGridSelector.__showbutton=function(_a){if(this._trackbar[0]){if(!_a){this._trackbar[0]._control_element.setElementVisible(false);this._trackbar[1]._control_element.setElementVisible(false);this._trackbar[2]._control_element.setElementVisible(false);this._trackbar[3]._control_element.setElementVisible(false);}else{this._trackbar[0]._control_element.setElementVisible(this._trackbar[0].visible);this._trackbar[1]._control_element.setElementVisible(this._trackbar[1].visible);}}};}_pGridSelector._trackingHScroll=function(_a,_b,_c,_d,_e,_f,_g){if(!this._adjust_scroll&&!this._grid.hscrollbar){return [0,0];}return this._grid._trackingHScroll(_a,_b,_c,this._start_begarea,this._start_endarea,_d,_e,_f,_g);};_pGridSelector._setAreaPos=function(_a,_b,_c,_d,_e,_f){var _g=["",""];var _h=this._grid;this._curarea=_h._selectinfo.ctrlpoint.area;if(_e){var _j=this._grid._getTrackType(this,_a,_b,_c,_d,_f,this._onlyarea);_a=_j.adjust_l;_b=_j.adjust_t;_c=_j.adjust_w;_d=_j.adjust_h;_g[0]=_j.type[0];_g[1]=_j.type[1];}var _i=(_h._selectinfo.area.length>0)?false:true;if(_c<=0){_c=1;}if(_d<=0){_d=1;}this._area_pos.l=_a;this._area_pos.t=_b;this._area_pos.w=_c;this._area_pos.h=_d;this._area_pos.area=this._curarea;this._area_pos.empty=_i;if(_e){this._area_pos.scrolltop=_h._getScrollTop();}return _g;};_pGridSelector.move=function(_a,_b,_c,_d,_e){if(!this._is_tracking){if(_a>this._grid._client_width){return;}this._start_begarea=this._grid._selectinfo.arearect.barea;this._start_endarea=this._grid._selectinfo.arearect.earea;this._setAreaPos(_a,_b,_c,_d);this._recalcarea(_e);}else{this._setAreaPos(_a,_b,_c,_d);}return nexacro.Component.prototype.move.call(this,_a,_b,_c,_d,undefined,undefined);};_pGridSelector._setCallbackFn=function(_a,_b,_c){this._callback_start=_a;this._callback=_b;this._callback_scroll=_c;};_pGridSelector._initTrackInfo=function(){this._start_scroll_top= -1;this._start_scroll_left= -1;this._end_scroll_top= -1;this._end_scroll_left= -1;this._pre_idx= -1;};delete _pGridSelector;nexacro.GridControlResizer=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){nexacro.Component.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i);this._is_simple_control=true;this._is_track=true;this._callback=null;this._index= -1;this._direction="";this._tracksize= -1;this._is_range=false;this._movedPos=0;this._is_tracking=false;this._no_slide_scroll=true;};var _pGridResizer=nexacro._createPrototype(nexacro.Component,nexacro.GridControlResizer);nexacro.GridControlResizer.prototype=_pGridResizer;_pGridResizer.on_find_CurrentStyle_cursor=function(_a){var _b=this._direction;var _c;if(_b=="horizon"){_c=nexacro._getCachedValueObj("col-resize");}else{_c=nexacro._getCachedValueObj("row-resize");}return _c;};_pGridResizer.on_create_contents=function(){};_pGridResizer.on_created_contents=function(){this.set_visible(false);this._on_apply_tracksize();var _a=nexacro._getCachedBackgroundObj("gray");this.on_apply_style_background(_a);var _b=this._direction;var _c;if(_b=="horizon"){_c=nexacro._getCachedValueObj("col-resize");}else{_c=nexacro._getCachedValueObj("row-resize");}this.on_apply_style_cursor(_c);};_pGridResizer._setCallbackFn=function(_a){this._callback=_a;};_pGridResizer._setIndex=function(_a){this._index=_a;};_pGridResizer._setDirection=function(_a){if(this._direction!=_a){this._direction=_a;this._on_apply_direction();}};_pGridResizer._on_apply_direction=function(){var _a=this.getElement();if(_a){this._on_apply_tracksize();var _b=this._direction;var _c;if(_b=="horizon"){_c=nexacro._getCachedValueObj("col-resize");}else{_c=nexacro._getCachedValueObj("row-resize");}this.on_apply_style_cursor(_c);}};_pGridResizer._setTracksize=function(_a){if(this._tracksize!=_a){this._tracksize=_a;this._on_apply_tracksize();}};_pGridResizer._on_apply_tracksize=function(){var _a=this.getElement();if(_a){var _b=this._tracksize;var _c=this._direction;if(_c=="horizon"){this.resize(1,_b);}else if(_c=="vertical"){this.resize(_b,1);}}};_pGridResizer._moveLeftTo=function(_a){this.left=_a=_a||0;this.move(_a,this.top);};_pGridResizer._moveTopTo=function(_a){this.top=_a=_a||0;this.move(this.left,_a);};_pGridResizer._on_starttrack=function(){if(!this._is_alive){return;}this._movedPos=0;this._is_tracking=true;};_pGridResizer._on_movetrack=function(_a,_b,_c){if(!this._is_alive){return;}var _d=this.parent;if(_d.ondrag&&_d.ondrag.defaultprevented==true){return;}if(_d.ondragmove&&_d.ondragmove.defaultprevented==true){return;}if(!this.visible){this.set_visible(true);}if(this._direction=="horizon"){var _e=_a-this._movedPos;this._moveLeftTo(this.left+_e);this._movedPos=_a;}else if(this._direction=="vertical"){var _f=_b-this._movedPos;this._moveTopTo(this.top+_f);this._movedPos=_b;}};_pGridResizer._on_endtrack=function(_a,_b,_c){if(!this._is_alive){return;}var _d=this.getElement();if(_d){if(nexacro._cur_drag_info){nexacro._cur_drag_info=null;}if(this.visible){this.set_visible(false);}var _e=this.parent;if((_e.ondrag&&_e.ondrag.defaultprevented==true)||(_e.ondragmove&&_e.ondragmove.defaultprevented==true)){_e._setGlobalCursor(null,_e);}else{if(this._callback&&this._movedPos!=0){if(this._direction=="horizon"){this._callback.call(this.parent,_a,this._index);}else if(this._direction=="vertical"){this._callback.call(this.parent,_b,this._index);}}_e._setGlobalCursor(null,_e);}}this._is_tracking=false;};delete _pGridResizer;nexacro.GridControlLine_Style=function(_a,_b){nexacro.Style.call(this,_a,_b);this.border=new nexacro.Style_border(1);};var _pGridControlLineStyle=nexacro.GridControlLine_Style.prototype=nexacro._createPrototype(nexacro.Style,nexacro.GridControlLine_Style);_pGridControlLineStyle._type_name="GridControlLineStyle";nexacro.GridControlLine_CurrentStyle=function(){this.border=null;};var _pGridControlLineCurrentStyle=nexacro.GridControlLine_CurrentStyle.prototype=nexacro._createPrototype(nexacro.CurrentStyle,nexacro.GridControlLine_CurrentStyle);_pGridControlLineCurrentStyle._type_name="GridControlLineCurrentStyle";delete _pGridControlLineStyle;delete _pGridControlLineCurrentStyle;nexacro.GridControlLine=function(_a,_b,_c,_d,_e,_f){nexacro.Component.call(this,_a,"absolute",_b,_c,_d,_e,null,null,_f);this.tabstop=false;this._is_subcontrol=true;this._is_simple_control=true;this._is_nc_control=true;if(_f._refobj){this._grid=_f._refobj.grid;this._cellinfo=_f._refobj;this._cellobj=_f;}else{this._grid=_f._grid;this._cellinfo=_f._cellinfo;this._cellobj=_f._cellobj;}this._linetype={};this._depth= -1;this._showleft=false;this._showbottom=false;};var _pGridControlLine=nexacro._createPrototype(nexacro.Component,nexacro.GridControlLine);nexacro.GridControlLine.prototype=_pGridControlLine;_pGridControlLine._type_name="GridControlLine";_pGridControlLine.on_create_custom_style=function(){return new nexacro.GridControlLine_Style(this);};_pGridControlLine.on_create_custom_currentStyle=function(){return new nexacro.GridControlLine_CurrentStyle();};_pGridControlLine.on_find_CurrentStyle_border=function(_a){var _b=this._linetype.width+"px "+this._linetype.style+" "+this._linetype.color;var _c="0px none transparent, 0px none transparent, ";if(this._showbottom){_c+=_b+", ";}else{_c+="0px none transparent, ";}if(this._showleft){_c+=_b;}else{_c+="0px none transparent";}var _d=nexacro._getCachedStyleObj("border",_c);return _d;};_pGridControlLine.on_find_CurrentStyle_cursor=function(_a){var _b=this._grid;if(_b._global_cursor){return _b._global_cursor;}return this.parent.on_find_CurrentStyle_cursor(_a);};_pGridControlLine._makeCssRefInfo=function(){return (this._grid._makeCssRefInfoCtrl(this));};_pGridControlLine.on_change_containerRect=function(_a,_b){this._control_pseudo="";this._contents_pseudo="";this.on_apply_pseudo(this._pseudo);};_pGridControlLine.on_destroy_contents=function(){this._grid=null;this._cellinfo=null;this._cellobj=null;};_pGridControlLine._isEnable=function(){return this._grid._enable;};_pGridControlLine._set_line=function(_a,_b,_c){var _d=this.getElement();if(_d&&_a){this._linetype=_a;this._showleft=_b;this._showbottom=_c;this._control_pseudo="";this._contents_pseudo="";this.on_apply_pseudo(this._pseudo);}};delete _pGridControlLine;nexacro.GridControlTree=function(_a,_b,_c,_d,_e,_f){nexacro.Component.call(this,_a,"absolute",_b,_c,_d,_e,null,null,_f);this.tabstop=false;this._is_subcontrol=true;this._grid=_f._refobj.grid;this._cellinfo=_f._refobj;this._cellobj=_f;this._linetype={};this._leftline_ctrls=[];};var _pGridTree=nexacro._createPrototype(nexacro.Component,nexacro.GridControlTree);nexacro.GridControlTree.prototype=_pGridTree;_pGridTree._type_name="GridControlTree";_pGridTree._btn_elem=null;_pGridTree._chk_ctrl=null;_pGridTree._img_elem=null;_pGridTree._text_elem=null;_pGridTree._applied_state= -1;_pGridTree._display_text="";_pGridTree._upline_ctrl=null;_pGridTree._downline_ctrl=null;_pGridTree._leftline_ctrls=null;_pGridTree._clicktarget=null;_pGridTree.on_apply_custom_pseudo=function(_a){if(!this._is_created){return;}var _b=this.getElement();if(!_b){return;}if(!_a){_a=this._pseudo;}var _c=this.currentstyle;var _d=this.on_find_CurrentStyle_font(_a);if(_c.font!=_d){_c.font=_d;this.on_apply_style_font(_d);}var _e=this.on_find_CurrentStyle_color(_a);if(_c.color!=_e){_c.color=_e;this.on_apply_style_color(_e);}var _f=this.on_find_CurrentStyle_align(_a);if(_c.align!=_f){_c.align=_f;this.on_apply_style_align(_f);}var _g=this._grid;if(this._cellobj._is_created){if(!_g._ReasonRefresh){_g.on_apply_cell_pseudo(this._cellobj,_a);}}};_pGridTree.on_find_CurrentStyle_font=function(_a){return this.parent.on_find_CurrentStyle_font(_a);};_pGridTree.on_find_CurrentStyle_color=function(_a){return this.parent.on_find_CurrentStyle_color(_a);};_pGridTree.on_find_CurrentStyle_cursor=function(_a){var _b=this._grid;if(_b._global_cursor){return _b._global_cursor;}return this.parent.on_find_CurrentStyle_cursor(_a);};_pGridTree.on_find_CurrentStyle_padding=function(_a){return null;};_pGridTree._makeCssRefInfo=function(){return (this._grid._makeCssRefInfoCtrl(this));};_pGridTree._find_pseudo_obj=function(_a,_b,_c){var _d=this._cellinfo;var _e=this._cellobj;if(this._displaymode==true){if(_b!="disabled"){_b="normal";}}var _f=(_e._rowidx>=0)?(_e._rowidx%2):false;var _g=this._grid;var _h=_g._getDataRow(this._cellobj._rowidx);var _i=_d._query_pseudo_control(this,_h,_a,_a,_b,_c,null,_f,_e._isSelected());return _i;};_pGridTree.on_create_contents=function(){var _a=this.getElement();var _b=this._getLineHeight();this._rightline_ctrl=new nexacro.GridControlLine("controlrightline",0,0,0,0,this.parent);this._rightline_ctrl._is_subcontrol=true;this._rightline_ctrl.createComponent(true);this._upline_ctrl=new nexacro.GridControlLine("controlupline",0,0,0,0,this.parent);this._upline_ctrl._is_subcontrol=true;this._upline_ctrl.createComponent(true);this._downline_ctrl=new nexacro.GridControlLine("controldownline",0,0,0,0,this.parent);this._downline_ctrl._is_subcontrol=true;this._downline_ctrl.createComponent(true);this._chk_ctrl=new nexacro.GridCellCheckbox("controlcheckbox",0,0,0,0,this);this._chk_ctrl._is_subcontrol=true;this._chk_ctrl.createComponent(true);this._text_elem=new nexacro.TextBoxElement(_a);if(nexacro.Browser=="IE"&&nexacro.BrowserVersion==8){this._img_elem=new nexacro.AlignImageElement(_a);this._btn_elem=new nexacro.AlignImageElement(_a);}else{this._img_elem=new nexacro.ImageElement(_a);this._btn_elem=new nexacro.ImageElement(_a);}};_pGridTree.on_created_contents=function(){if(this._rightline_ctrl){this._rightline_ctrl.on_created();}if(this._upline_ctrl){this._upline_ctrl.on_created();}if(this._downline_ctrl){this._downline_ctrl.on_created();}if(this._btn_elem){this._btn_elem.create();}if(this._chk_ctrl){this._chk_ctrl.on_created();}if(this._img_elem){this._img_elem.create();}if(this._text_elem){var _a=this._grid._getAvailableRect(this);this._text_elem.setElementSize(_a.width,_a.height);this._text_elem.create();}this._is_created=true;this._control_pseudo="";this._contents_pseudo="";this._updateAll();};_pGridTree.on_destroy_contents=function(){var _a=this._leftline_ctrls;for(var _b=0;_b<_a.length;_b++ ){_a[_b].destroy();}this._leftline_ctrls=[];if(this._rightline_ctrl){this._rightline_ctrl.destroy();this._rightline_ctrl=null;}if(this._upline_ctrl){this._upline_ctrl.destroy();this._upline_ctrl=null;}if(this._downline_ctrl){this._downline_ctrl.destroy();this._downline_ctrl=null;}if(this._btn_elem){this._btn_elem.destroy();this._btn_elem=null;}if(this._chk_ctrl){this._chk_ctrl.destroy();this._chk_ctrl=null;}if(this._img_elem){this._img_elem.destroy();this._img_elem=null;}if(this._text_elem){this._text_elem.destroy();this._text_elem=null;}this._clicktarget=null;};_pGridTree._setAccessibilityStatFocus=function(_a){var _b="";var _c=this._cellobj;var _d=_c._getCellAccessibilityLabel();this._setAccessibilityLabel(_d);var _e=this._cellinfo._getTreeLevel(_c._rowidx);var _f=this._cellinfo._getTreeStartLevel(_c._rowidx);if(this._grid.getTreeStatus(_c._rowidx)==0){this._setAccessibilityStatExpanded(false);}else{this._setAccessibilityStatExpanded(true);}this._setAccessibilityInfoLevel(_e-_f+1);nexacro.Component.prototype._setAccessibilityStatFocus.call(this,_a);};_pGridTree.on_get_style_accessibility_description=function(){if(this._cellobj){return this._cellobj.tooltiptext;}};_pGridTree.on_apply_text=function(){var _a=this._text_elem;if(_a){_a.setElementText(this._display_text);}};_pGridTree.on_apply_style_font=function(_a){if(_a){if(this._text_elem){this._text_elem.setElementFont(_a);}}};_pGridTree.on_apply_style_color=function(_a){if(_a){if(this._text_elem){this._text_elem.setElementColor(_a);}}};_pGridTree.on_apply_style_align=function(_a){if(_a){if(this._text_elem){this._text_elem.setElementAlignXY("left",_a.valign);}}};_pGridTree._common_lbuttondown=function(_a){var _b=this._grid;var _c=_b._getDataRow(this._cellobj._rowidx);var _d=_b._treeStates[_c];if(_a==this._btn_elem){this._clicktarget=_d;}};_pGridTree._on_touchstart=function(_a,_b,_c,_d,_e,_f){if(!this._is_alive){return;}var _g=nexacro._getFirstTouchInfo(_c);if(_g){this._common_lbuttondown(_g._elem);}return nexacro.Component.prototype._on_touchstart.call(this,_a,_b,_c,_d,_e,_f);};_pGridTree._on_lbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(!this._is_alive){return;}this._common_lbuttondown(_a);return nexacro.Component.prototype._on_lbuttondown.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);};_pGridTree._on_click=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){if(!this._is_alive){return;}if(nexacro.Browser=="IE"&&nexacro.BrowserVersion>=9&&_a==this._btn_elem){return;}if(this.visible&&this._isEnable()&&this.enableevent){var _j;if(_a instanceof nexacro.TextBoxElement){_j="text";}else if(_a instanceof nexacro.ImageElement){if(this._btn_elem==_a){_j="treebutton";}else{_j="image";}}else{_j="";}var _k=this._getClientXY(_f,_g);this.on_fire_onclick(_b,_c,_d,_e,_h,_i,_f,_g,_k[0],_k[1],this,this,_j);if(this._is_alive==false){if(!this._grid._after_recreate_contents_all){this._grid._after_recreate_contents_all=[true,true,true,true];}this._on_last_lbuttonup();}}};_pGridTree._on_dblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){if(!this._is_alive){return;}if(this.visible&&this._isEnable()&&this.enableevent){var _j;if(_a instanceof nexacro.TextBoxElement){_j="text";}else if(_a instanceof nexacro.ImageElement){_j="image";}else{_j="control";}var _k=this._getClientXY(_f,_g);this.on_fire_ondblclick(_b,_c,_d,_e,_h,_i,_f,_g,_k[0],_k[1],this,this,_j);}};_pGridTree._on_last_lbuttonup=function(){this._cellobj._on_last_lbuttonup();};_pGridTree._on_last_keyup=function(){this._cellobj._on_last_keyup();};_pGridTree._common_fire_lbuttondown=function(_a,_b){if(this._btn_elem&&this._grid.treeusebutton!="noclick"){if(this._is_elem_area(this._btn_elem,_a,_b)){if(this._isEditTypeTree()){var _c=this._grid;var _d=this._cellobj;var _e=_c._getDataRow(_d._rowidx);_d._tree_lbuttondown=true;_c._toggleTreeState(_d._rowidx,true);if(this._is_alive){_d._tree_lbuttondown=false;}var _f=_c._treeStates[_e];if(this._clicktarget!=_f&&nexacro.Browser=="IE"&&nexacro.BrowserVersion>8){_c._treetarget={row:_e,cell:_d._cellidx};}}}}};_pGridTree.on_fire_user_ontouchstart=function(_a,_b,_c,_d){var _e=nexacro._getFirstTouchInfo(_b);if(_e){this._common_fire_lbuttondown(_e.canvasX,_e.canvasY);}};_pGridTree.on_fire_user_onlbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){this._common_fire_lbuttondown(_g,_h);};_pGridTree._common_fire_lbuttonup=function(){if(this._cellobj._tree_lbuttondown){this._cellobj._tree_lbuttondown=false;}};_pGridTree.on_fire_user_ontouchend=function(_a,_b,_c,_d){this._common_fire_lbuttonup();};_pGridTree.on_fire_user_onlbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){this._common_fire_lbuttonup();};_pGridTree._on_treecheckboxclick=function(_a,_b){if(!this._is_alive){return;}var _c=this._grid;if(_a==this._chk_ctrl){var _d=this._cellobj;var _e=this._cellinfo;var _f=_c._getDataRow(_d._rowidx);var _g=_d._getDisplayRowIdx();if(_e.treecheck._bindtype==1){var _h=_c._treeChecked[_f];var _i=_e.treecheck._bindexpr;var _j=(_h==0)?1:0;_c._binddataset.setColumn(_f,_i,_j);}else{if(_c._toggleTreeChecked(_f)){_c._refreshBodyRow(_g);}}}};_pGridTree.on_fire_ondblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){return this._cellobj.on_fire_ondblclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);};_pGridTree.on_fire_onclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){var _n=_l;while(_n){if(_n._type_name=="CheckBoxControl"){break;}_n=_n.parent;}if(this._isEditTypeTree()){this._on_treecheckboxclick(_n);}var _o=this._grid;var _p=this._cellinfo;var _q=_o._getDataRow(this._cellobj._rowidx);if(!this._is_alive){return;}return this._cellobj.on_fire_onclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);};_pGridTree._isEditTypeTree=function(){var _a=this._grid;var _b=this._cellobj;var _c=this._cellinfo;var _d=_a._getDataRow(_b._rowidx);var _e=_c._getEdittype(_d);if(_e=="tree"){return true;}else{return false;}};_pGridTree._is_elem_area=function(_a,_b,_c){var _d=this._getCumulativeZoomFactor()/100.0;var _e=_a.left;var _f=_a.top;var _g=_a.width*_d;var _h=_a.height*_d;if(_b>=_e&&_b<=(_e+_g)){if(_c>=_f&&_c<=(_f+_h)){return true;}else{return false;}}else{return false;}};_pGridTree._getLineHeight=function(){var _a=this.parent._adjust_height;var _b=(this.parent.currentstyle.border)?this.parent.currentstyle.border._bottom_width:0;return _a-_b;};_pGridTree._isEnable=function(){return this._grid._enable;};_pGridTree._load_image=function(_a,_b){var _c=(_b)?_b.toString():null;if(this.getElement()&&_c){_c=nexacro._getURIValue(_c);_c=nexacro._getImageLocation(_c,this._getRefFormBaseUrl());_a._load_url=_c;var _d=nexacro._getImageSize(_c,this._on_loadImage,this);if(_d){this._on_loadImage(_c,_d.width,_d.height);}}};_pGridTree._on_loadImage=function(_a,_b,_c){var _d=false;if(this._btn_elem&&this._btn_elem._load_url==_a){this._btn_elem.setElementImageUrl(_a);var _e=this._btn_elem.width;var _f=this._btn_elem.height;if(_e!=_b||_f!=_c){_d=true;this._btn_elem.setElementSize(_b,_c);}}if(this._img_elem&&this._img_elem._load_url==_a){this._img_elem.setElementImageUrl(_a);var _e=this._img_elem.width;var _f=this._img_elem.height;if(_e!=_b||_f!=_c){_d=true;this._img_elem.setElementSize(_b,_c);}}if(_d){this._adjustSubCompAlign(this._lvl);}};_pGridTree._buttonUpdate=function(_a){if(this._grid.treeusebutton!=this._treeusebutton){if(this._grid.treeusebutton=="use"){this._btn_elem.setElementVisible(true);}else{this._btn_elem.setElementVisible(false);}this._treeusebutton=this._grid.treeusebutton;}var _b="tree";var _c="normal";if(_a==0){_b+="openbuttonimage";}else if(_a==1){_b+="closebuttonimage";}else if(_a==2||_a== -1){this._btn_elem.setElementVisible(false);this._btn_elem.setElementSize(0,0);return;}var _d=this._grid;var _e=_d._getDataRow(this._cellobj._rowidx);var _f=this._cellinfo._query_pseudo_treecontrol(_e,_b,_c);this._load_image(this._btn_elem,_f);};_pGridTree._checkUpdate=function(_a){if(this._grid.treeusecheckbox!=this._treeusecheckbox){if(this._chk_ctrl){this._chk_ctrl.set_visible(this._grid.treeusecheckbox);}this._treeusecheckbox=this._grid.treeusecheckbox;}if(this._chk_ctrl){this._chk_ctrl.set_value(_a);}};_pGridTree._imageUpdate=function(_a){if(this._grid.treeuseimage!=this._treeuseimage){if(this._img_elem){this._img_elem.setElementVisible(this._grid.treeuseimage);}this._treeuseimage=this._grid.treeuseimage;}var _b;var _c="normal";if(_a==0){_b="treecollapseimage";}else if(_a==1){_b="treeexpandimage";}else if(_a==2||_a==3){_b="treeitemimage";}var _d=this._grid;var _e=_d._getDataRow(this._cellobj._rowidx);var _f=this._cellinfo._query_pseudo_treecontrol(_e,_b,_c);this._load_image(this._img_elem,_f);if(_f){this._img_elem.setElementVisible(this._grid.treeuseimage);}else{this._img_elem.setElementVisible(false);}this._adjustSubCompAlign(this._lvl);};_pGridTree._lineUpdate=function(_a,_b){if(this._grid.treeuseline!=this._treeuseline){if(this._rightline_ctrl){this._rightline_ctrl.set_visible(this._grid.treeuseline);}if(this._upline_ctrl){this._upline_ctrl.set_visible(this._grid.treeuseline);}if(this._downline_ctrl){this._downline_ctrl.set_visible(this._grid.treeuseline);}this._treeuseline=this._grid.treeuseline;}var _c=this._grid;var _d=_c._find_pseudo_obj("treelinetype",_c._pseudo,"line");if(!_d){return;}var _e=this._cellinfo._getTreeStartLevel(_a);var _f=this._cellinfo._getTreeLevel(_a+1);var _g=_c._getParentNodeSameInfo(_b-1,_a);var _h=_c._getParentNodeSameInfo(_b,_a);var _i=(_e>=_b)?true:false;this._createLeftLine(_a,_d);var _j;if(this._rightline_ctrl){_j=this._rightline_ctrl;_j._set_line(_d,false,true);}if(this._upline_ctrl){_j=this._upline_ctrl;_j._set_line(_d,!_i,false);}if(this._downline_ctrl&&!_i&&_h){_j=this._downline_ctrl;_j._set_line(_d,true,false);}else if(this._downline_ctrl){this._downline_ctrl.set_visible(false);}this._linetype=_d;};_pGridTree._createLeftLine=function(_a,_b){for(var _g=0;_g_am){_w=_am-_t;}this._downline_ctrl.move(_s+_p,_t,_u,_w);}if(this._chk_ctrl&&this._chk_ctrl.visible){var _an=this._chk_ctrl.width;if(_an<=0){_an=_l;}var _ao=this._chk_ctrl.height;if(_ao<=0){_ao=_l;}var _ap=_r;var _aq=Math.round((_g-_ao)/2);_r+=_an;this._chk_ctrl.move(_ap,_aq,this._chk_ctrl._adjust_width,this._chk_ctrl._adjust_height);}if(this._img_elem&&this._img_elem.visible){_r+=1;var _ar=this._img_elem.width;var _as=this._img_elem.height;if(_ar>0&&_as>0){var _at=_r;var _au=Math.round((_g-_as)/2);var _av=_at+_ar;var _aw=_au+_as;_r+=_ar;}else{}this._img_elem.setElementPosition(_at,_au);_r+=5;}else{_r+=4;}if(this._text_elem){var _ax=_r;var _ay=0;this._text_elem.setElementPosition(_ax,_ay);this._text_elem.setElementSize(_f-_r,_g);}};_pGridTree.on_change_containerRect=function(_a,_b){if(this._lvl){this._adjustSubCompAlign(this._lvl);}};delete _pGridTree;nexacro.GridRow_Style=function(_a,_b){nexacro.Style.call(this,_a,_b);this.border=new nexacro.Style_border(1);};var _pGridRowStyle=nexacro.GridRow_Style.prototype=nexacro._createPrototype(nexacro.Style,nexacro.GridRow_Style);_pGridRowStyle._type_name="GridRowStyle";nexacro.GridRow_CurrentStyle=function(){this.border=null;};var _pGridRowCurrentStyle=nexacro.GridRow_CurrentStyle.prototype=nexacro._createPrototype(nexacro.CurrentStyle,nexacro.GridRow_CurrentStyle);_pGridRowCurrentStyle._type_name="GridRowCurrentStyle";delete _pGridRowStyle;delete _pGridRowCurrentStyle;nexacro.GridRow=function(_a,_b,_c,_d,_e,_f){nexacro.Component.call(this,"gridrow_"+_f,"absolute",_b,_c,_d,_e,null,null,_a);this._is_subcontrol=true;this._grid=_a.parent;this._band=_a;this._cells=[];this._rowidx=_f;this._row_sizes=[];this._row_tops=[];this._row_bottoms=[];this._format_rows=[];this._format_cols=[];this._format_cells=[];this._noupdate_remain_cells=[];this._accessibility_role="none";this._fixed=false;};var _pGridRow=nexacro._createPrototype(nexacro.Component,nexacro.GridRow);nexacro.GridRow.prototype=_pGridRow;nexacro._setForControlStyleFinder(_pGridRow);_pGridRow._type_name="GridRow";_pGridRow.on_create_custom_style=function(){return new nexacro.GridRow_Style(this);};_pGridRow.on_create_custom_currentStyle=function(){return new nexacro.GridRow_CurrentStyle();};_pGridRow.on_find_CurrentStyle_cursor=function(_a){var _b=this._grid;if(_b._global_cursor){return _b._global_cursor;}return this.parent.on_find_CurrentStyle_cursor(_a);};_pGridRow.on_find_CurrentStyle_border=function(_a){return null;};_pGridRow.on_find_CurrentStyle_padding=function(_a){return null;};_pGridRow._makeCssRefInfo=function(){return (this._grid._makeCssRefInfoCtrl(this));};_pGridRow.on_create_contents=function(){this._init(this._grid._curFormat);if(this._grid._async_create){this._createCellComponents_async();}else{this._createCellComponents();}};_pGridRow.on_created_contents=function(){this._control_element.setElementHScrollPos(this._grid.getElement().scroll_left);if(this._grid._async_create){this._createCellElements_async();}else{this._createCellElements();}this._control_element._setContainerMaxWidth(this._grid._bodyBand._scrollWidth);};_pGridRow.on_destroy_contents=function(){var _a=this._cells,_b=_a.length;for(var _c=0;_c<_b;_c++ ){_a[_c].destroy();}this._grid=this._cells=this._format=this._band=this._cells=this._row_sizes=this._row_tops=this._row_bottoms=this._format_rows=this._format_cols=this._format_cells=this._noupdate_remain_cells=null;};_pGridRow.on_create_control_element=function(_a){var _b=new nexacro.GridRowControlElement(_a);var _c=this._grid._curFormat;_b.setLinkedControl(this);_b._left_width=_c.leftWidth;_b._right_width=_c.rightWidth;this._control_element=_b;return _b;};_pGridRow._getAccessibilityLabel=function(_a){var _b="";var _c=this._grid;if(this._grid._isSelectRowType()){var _d="";var _e=this._cells;var _f=null;for(var _g=0;_g<_e.length;_g++ ){_f=_e[_g].currentstyle.accessibility;if(_f){_d=_e[_g]._getAccessibilityLabel(_f);if(_b){if(_d){_b+=" "+_d;}}else{_b=_d;}}}}return _b;};_pGridRow.on_apply_prop_rtldirection=function(){nexacro.Component.prototype.on_apply_prop_rtldirection.call(this);var _a=this._cells;var _b=this._rtldirection;if(_a){var _c;for(var _d=0;_d<_a.length;_d++ ){_a[_d]._setRtlDirection(_b);}}};_pGridRow._init=function(_a){var _b=this._grid,_c=this._control_element;_c.setArea(_a.leftWidth,_a.rightWidth);if(this._rowidx== -1){this._format_rows=_a._headrows;this._format_cells=_a._headcells;}else if(this._rowidx== -2){this._format_rows=_a._summrows;this._format_cells=_a._summcells;}else{this._format_rows=_a._bodyrows;this._format_cells=_a._bodycells;}this._format_cols=_a._cols;if(!this._format_cols){this._format_cols=[];}if(!this._format_rows){this._format_rows=[];}if(!this._format_cells){this._format_cells=[];}var _d,_e=0;if(this._rowidx== -1){_d=_b._rowHeadListSub;}else if(this._rowidx== -2){_d=_b._rowSummListSub;}else{_e=_b._getDataRow(this._rowidx);_d=_b._rowSizeListSub;}var _f=this._format_rows,_g=_f.length,_h=0,_i=0;this._row_tops=[];this._row_sizes=[];this._row_bottoms=[];if(_e>=0){var _j=_e*_g;for(var _k=0;_k<_g;_k++ ){this._row_tops.push(_i);_h=_d[_j+_k];this._row_sizes.push(_h);_i+=_h;this._row_bottoms.push(_i);}}else{for(var _k=0;_k<_g;_k++ ){this._row_tops.push(_i);_h=_f[_k].size;this._row_sizes.push(_h);_i+=_h;this._row_bottoms.push(_i);}}};_pGridRow._on_last_lbuttonup=function(){this.parent._on_last_lbuttonup();};_pGridRow._on_last_keyup=function(){this.parent._on_last_keyup();};_pGridRow._updateAll=function(_a,_b,_c,_d,_e){var _f=this._grid,_g=this._cells;if(_b){_g=this._noupdate_remain_cells;}var _h=_g.length,_i=_f._getDataRow(this._rowidx),_j,_k,_l,_m,_n,_o;this._noupdate_remain_cells=[];this.on_apply_pseudo(_a);for(var _p=0;_p<_h;_p++ ){_l=_g[_p];_m=_l._refobj;if(_e){if((_m._col+_m._colspan-1)<_e){continue;}}if(_l._refobj._area!="body"||(_l._is_created&&_l._isUpdateArea())){if(_f._isSelectRowType()){if(_n==undefined){_n=_f._isSelectedCell(_l._cellidx,_i);}}else{_n=_f._isSelectedCell(_l._cellidx,_i);}_o=false;if(_l._selected!=_n){_l._selected=_n;_c=false;_o=true;}_j=_l.subcells;_k=_j.length;for(var _q=0;_q<_k;_q++ ){_j[_q]._selected=_n;}if(_d){if(_o){_l._updateAll(_a,_c);}}else{_l._updateAll(_a,_c);}}else{this._noupdate_remain_cells.push(_l);}}};_pGridRow._getAreaRect=function(_a){var _b={left:0,top:0,width:0,height:0},_c=this._grid._curFormat;_b.top=this._client_top;_b.height=this._client_height;if(_a=="left"){_b.left=this._client_left;_b.width=_c.leftWidth;}else if(_a=="right"){_b.left=this._client_width-_c.rightWidth;_b.width=_c.rightWidth;}else{_b.left=_c.leftWidth;_b.width=this._client_width-_c.leftWidth-_c.rightWidth;}return _b;};_pGridRow._changeRow=function(_a,_b){this._rowidx=_a;if(_b){this._init(this._grid._curFormat);}};_pGridRow._hideArea=function(){if(this._fixed){return "";}var _a=this._band;var _b=this._grid;var _c=_b._getScrollTop();var _d=this._adjust_top;var _e=this._adjust_height;var _f=_d+_e;_d-=_c;_f-=_c;var _g=_b._getAvailableRect(_a);var _h=_a.currentstyle.border;_f-=_h?_h._top_width:0;_f-=_h?_h._bottom_width:0;if(_f<=0){return "top";}else if(_d>=_g.bottom){return "bottom";}return "";};_pGridRow._showfull=function(_a){if(!this._fixed){var _b=this._band;var _c=this._grid;var _d=_c._getScrollTop();var _e=this._adjust_top;var _f=this._adjust_height;var _g=_e+_f;_e-=_d;_g-=_d;var _h=_c.vscrollbar;var _i=_c._getAvailableRect(_b);var _j=_b.currentstyle.border;_g-=_j?_j._top_width:0;_g-=_j?_j._bottom_width:0;if(_h){if(_f<_i.height){if(_e<0){if(_h._isEnable()){_h._set_rowpos(_c._toprowpos[0]);}}else if(_g>_i.bottom){if(_h._isEnable()){_h._set_rowpos(_c._toprowpos[0]+1);}}}}}if(_a&&_a._is_alive){_a._showfull(false);}};_pGridRow._createCellElements_async=function(){nexacro.OnceCallbackTimer.callonce(this,function(){this._createCellElements();});};_pGridRow._createCellElements=function(_a){var _b=this._cells;var _c=_b.length;if(_c==0){return;}var _d=this._grid,_e,_f,_g=false,_h=_d._getDataRow(this._rowidx),_i,_j,_k;if(this._rowidx<0||_d._is_created==true){_g=true;}for(var _l=0;_l<_c;_l++ ){_k=_b[_l]._refobj;if(_a){if((_k._col+_k._colspan-1)<_a){continue;}}if(_k._area=="body"){if(_d._isSelectRowType()){if(_i==undefined){_i=_d._isSelectedCell(_b[_l]._cellidx,_h);}}else{_i=_d._isSelectedCell(_b[_l]._cellidx,_h);}_j=_b[_l]._control_element;if(_b[_l]._isUpdateArea()){if(_b[_l]._is_created){if(_b[_l]._refresh_display==true){if(_g){_b[_l]._selected=_i;_b[_l]._updateAll();}_j._setDisplay(true);_b[_l]._refresh_display=false;}}else{if(_g){_b[_l]._selected=_i;_b[_l]._updateAll();}_b[_l].on_created();_e=_b[_l].subcells;_f=_e.length;for(var _m=0;_m<_f;_m++ ){if(_g){_e[_m]._updateAll();}_e[_m].on_created();}}}else{if(_b[_l]._is_created){if(_b[_l]._refresh_display==false){_b[_l]._refresh_display=true;_j._setDisplay(false);}}}}else{if(_b[_l]._is_created){continue;}if(_g){_b[_l]._updateAll();}_b[_l].on_created();_e=_b[_l].subcells;_f=_e.length;for(var _m=0;_m<_f;_m++ ){if(_g){_e[_m]._updateAll();}_e[_m].on_created();}}}};_pGridRow._createCellComponents_async=function(){nexacro.OnceCallbackTimer.callonce(this,function(){this._createCellComponents();});};_pGridRow._createCellComponents=function(){var _a=this._format_cols,_b=this._format_rows,_c=this._format_cells,_d=this._row_tops,_e=this._row_sizes,_f=this._row_bottoms,_g=(_c)?_c.length:0,_h,_i=0,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t,_u,_v,_w=this._grid,_x=_w._getDataRow(this._rowidx);for(var _y=0;_y<_g;_y++ ){_h=_c[_y];_j=_a[_h._col].left;_i=_d[_h._row];_k=_a[_h._col+_h._colspan-1].right-_j;_l=_f[_h._row+_h._rowspan-1]-_i;if(_w._isSelectRowType()){if(_u==undefined){_u=_w._isSelectedCell(_h._cellidx,_x);}}else{_u=_w._isSelectedCell(_h._cellidx,_x);}_n="cell_"+this._rowidx+"_"+_h._cellidx;_m=new nexacro.GridCell(_n,_j,_i,_k,_l,this,_h,this._rowidx,_h._cellidx);_m._selected=_u;_m.createComponent(true);this._cells[_y]=_m;_o=_h._subcells;_p=_o.length;for(var _z=0;_z<_p;_z++ ){_v=_o[_z];_r=_h._col+_v._col;_s=_h._row+_v._row;_j=_a[_r].left;_i=_d[_s];_k=_a[_r+_v._colspan-1].right-_j;_l=_e[_s];_j-=_a[_h._col].left;_i-=_d[_h._row];_n="subcell_"+this._rowidx+"_"+_h._cellidx+"_"+_v._cellidx;_t=new nexacro.GridCell(_n,_j,_i,_k,_l,_m,_v,this._rowidx,_v._cellidx);_t._isSubCell=true;_t._selected=_u;_t.parentcell=_m;_t.createComponent(true);_m.subcells[_z]=_t;}}};_pGridRow._resetCellsSize=function(_a,_b){var _c=this._format_cols,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q;this._control_element.setArea(_a.leftWidth,_a.rightWidth);_d=this._cells;_e=_d.length;var _r=this._row_tops,_s=this._row_sizes,_t=this._row_bottoms;for(var _u=0;_u<_e;_u++ ){_f=_d[_u];_g=_f._refobj;if(_b){if((_g._col+_g._colspan-1)<_b){continue;}}_l=_c[_g._col].left;_n=_r[_g._row];_m=_c[_g._col+_g._colspan-1].right-_l;_o=_t[_g._row+_g._rowspan-1]-_n;_f.move(_l,_n,_m,_o);expand_ctrl=_f._expandCtrl;if(expand_ctrl){_l=_m-expand_ctrl.width;_n=expand_ctrl.top;_m=expand_ctrl.width;_o=expand_ctrl.height;expand_ctrl.move(_l,_n,_m,_o);}_h=_f.subcells;_i=_h.length;for(var _v=0;_v<_i;_v++ ){_j=_h[_v];_k=_j._refobj;_p=_g._col+_k._col;_q=_g._row+_k._row;_l=_c[_p].left;_n=_r[_q];_m=_c[_p+_k._colspan-1].right-_l;_o=_s[_q];_l-=_c[_g._col].left;_n-=_r[_g._row];_j.move(_l,_n,_m,_o);expand_ctrl=_j._expandCtrl;if(expand_ctrl){_l=_m-expand_ctrl.width;_n=expand_ctrl.top;_m=expand_ctrl.width;_o=expand_ctrl.height;expand_ctrl.move(_l,_n,_m,_o);}}}};_pGridRow._isEnable=function(){return this._grid._enable;};_pGridRow._get_cells=function(){return this._cells;};delete _pGridRow;nexacro.GridMatrixManager=function(_a,_b){this._width=0;this._height=0;this._grid=_a;this._isBody=_b._isBody;this._rows=[];this._band=_b;this._fixed_rows=[];this._allrows=[];};var _pGridMatrixManager=nexacro._createPrototype(nexacro.Object,nexacro.GridMatrixManager);nexacro.GridMatrixManager.prototype=_pGridMatrixManager;_pGridMatrixManager._type_name="GridMatrixManager";_pGridMatrixManager.destroy=function(){this._deleteAllRow();this._grid=this._band=this._rows=this._fixed_rows=this._allrows=null;};_pGridMatrixManager._init=function(){this._deleteAllRow();};_pGridMatrixManager._async_create_page=function(){return;if(this._isBody){nexacro.OnceCallbackTimer.callonce(this._band,function(){this._matrix._adjustRowsDisplay();},10);}};_pGridMatrixManager._getBodyRowTopPos=function(_a){if(_a<0){return 0;}var _b=this._grid,_c=0;if(_b._fixed_endrow>=0&&_a>=_b._fixed_startrow&&_a<=_b._fixed_endrow){if(_b._is_variable_bodyrowsize==false){_c=_b._bodyrowheight*(_a-_b._fixed_startrow);}else{var _d=_b._fixed_rowcnt;for(var _e=0;_e<_d;_e++ ){if(_b._fixed_startrow+_e==_a){break;}_c+=_b._getRowSize(_b._fixed_startrow+_e);}}}else{if(_b._is_variable_bodyrowsize==false){_c=_b._bodyrowheight*_a;}else{var _d=_b._getGridRowCount();for(var _e=0;_e<_d;_e++ ){if(_e==_a){break;}_c+=_b._getRowSize(_e);}}_c-=_b._fixedrow_height;}return _c;};_pGridMatrixManager._getAllRows=function(){var _a;if(this._isBody){_a=this._allrows;if(_a.length==0){_a=_a.concat(this._fixed_rows);_a=_a.concat(this._rows);}}else{_a=this._rows;}return _a;};_pGridMatrixManager._getPhysicalRow=function(_a,_b){var _c=_a.length;for(var _d=0;_d<_c;_d++ ){if(_a[_d]._rowidx==_b){return _d;}}return null;};_pGridMatrixManager._adjustTreeDisplay=function(_a,_b){var _c=[],_d=this._grid,_e=this._band,_f=this._rows,_g=_f.length,_h=0,_i=this._getPhysicalRow(this._rows,_a),_j=_f[_i],_k=false;if(!_j){_j=_f[0];_i=0;}if(_j){if(_b){for(var _m=_g-1;_m>=_i;_m-- ){if(_j._rowidx<_f[_m]._rowidx){this._subtractRow();_k=true;}else{_c[0]=_f[_m];}}}else{for(var _m=_i;_m<_g;_m++ ){if(_i==_m){_c[0]=_f[_m];}else{this._subtractRow();_k=true;}}}}if(_k){_d._setHscrollElement();_d._absolutelyResetScrollPos(true);_d._control_element.setElementHScrollPos(_d._scroll_left);_d._absolutelyResetScrollPos(false);}var _l=this._adjustRowsDisplay();_g=_f.length;_e._update_rows=_c;if(_g){_h=_f[0]._rowidx;}for(var _m=0;_m<_g;_m++ ){_f[_m]._rowidx=_h+_m;}_e._on_refresh_rows();if(_l||_d._resetColSizeList()){this._adjustColsDisplay(true);}else{_d._resetScrollMax();}};_pGridMatrixManager._adjustRowsDisplay=function(_a,_b){var _c=this._grid,_d=0,_e=false,_f=false,_g=this._rows,_h=_g.length,_i;if(_a){var _j,_k,_l,_m,_n,_o=_c._getGridRowCount();for(var _p=0;_p<_g.length;_p++ ){_j=_g[_p];if(_j._rowidx>=_o){_j.destroy();_g[_p]=null;_g.splice(_p,1);_p-- ;}else{_k=_j._adjust_left;_l=this._getBodyRowTopPos(_j._rowidx);_m=this._band._client_width;_n=_c._getRowSize(_j._rowidx);_g[_p].move(_k,_l,_m,_n);}}_h=_g.length;var _q=this._fixed_rows;for(_p=0;_p<_q.length;_p++ ){_j=_q[_p];_k=_j._adjust_left;_l=this._getBodyRowTopPos(_j._rowidx);_m=this._band._client_width;_n=_c._getRowSize(_j._rowidx);_q[_p].move(_k,_l,_m,_n);}}if(this._isBody){if(_c._fixed_endrow>=0&&this._fixed_rows.length==0){var _r=_c._fixed_startrow;var _s=_c._fixed_endrow;var _t=0,_u;for(var _p=_r;_p<=_s;_p++ ){_u=_c._getRowSize(_p);if(_u<0){break;}this._addRow(_t,_u,_p,false,true);_t+=_u;}}_c._resetDisplayInfo(1,_a);if(_c._disprowcnt>0){_i=(_c._disprowcnt%2)?1:2;_d=_c._disprowcnt+_i;}var _v=_c._getGridRowCount();var _w=_c._is_variable_bodyrowsize;if(_d<0){_d=0;}if(_d<_h){for(var _p=_h-1;_p>=_d;_p-- ){if(!_w){this._subtractRow();_f=true;}}}else if(_d>_h){var _u=0,_t=0,_x=0,_y=_v-1;if(_h>0){_x=_g[0]._rowidx;}else{_x=_c._toprowpos[0];}var _z=_x;var _aa,_ab=false;for(var _p=_h;_p<_d;_p++ ){if(_v<=_p){break;}_aa=_x+_p;if(_y<_aa){_aa= --_z;_ab=true;}_t=this._getBodyRowTopPos(_aa);_u=_c._getRowSize(_aa);if(_aa<=_y&&_aa>=_c._getFixRowCnt()){this._addRow(_t,_u,_aa,_b);_e=true;}}if(_ab&&_e){_g.sort(function(_ac,_ad){return _ac._rowidx-_ad._rowidx;});}}_h=_g.length;if(_c.fillareatype!="none"&&_d>_h){var _t=0,_u=this._band._datarowsheight;if(_h){_t=_g[_h-1]._getPosBottom();}for(var _p=_h;_p<_d;_p++ ){this._addRow(_t,_u,_p,_b);_t+=_u;_e=true;}}if(_g.length>0){_c._begrowpos=_g[0]._rowidx;_c._endrowpos=_g[_g.length-1]._rowidx;}else{_c._begrowpos=0;_c._endrowpos=0;}}else{if(_h==0){var _u;if(this._band.id=="head"){_u=_c._getRowSize( -1);this._addRow(0,_u, -1);_e=true;}else if(this._band.id=="summ"){_u=_c._getRowSize( -2);this._addRow(0,_u, -2);_e=true;}}}if(_e||_f||_g.length==0){_c._setHscrollElement();_c._absolutelyResetScrollPos(true);_c._control_element.setElementHScrollPos(_c._scroll_left);_c._absolutelyResetScrollPos(false);}return _e;};_pGridMatrixManager._adjustColsDisplay=function(_a,_b,_c){var _d=this._getAllRows(),_e=_d.length;if(_a){var _f=this._grid._curFormat;for(var _g=0;_g<_e;_g++ ){_d[_g]._init(_f);_d[_g]._resetCellsSize(_f,_c);if(!_b){_d[_g]._updateAll(null,true,undefined,undefined,_c);}_d[_g]._createCellElements(_c);}}else{for(var _g=0;_g<_e;_g++ ){if(!_b){_d[_g]._updateAll(null,true,undefined,undefined,_c);}_d[_g]._createCellElements(_c);}}if(!_b){this._grid._resetScrollMax();}};_pGridMatrixManager._addRow=function(_a,_b,_c,_d,_e){var _f=this._grid._getAvailableRect(this._band),_g=new nexacro.GridRow(this._band,_f.left,_a,_f.width,_b,_c);_g._fixed=!!_e;_g.createComponent();if(!_d){this._band._create_rows.push(_g);}if(_e){this._fixed_rows.push(_g);}else{this._rows.push(_g);}};_pGridMatrixManager._subtractRow=function(){if(this._rows.length>1){var _a=this._rows.length-1,_b=this._rows[_a],_c=this._band._create_rows,_d=_c.length;for(var _e=0;_e<_d;_e++ ){if(_c[_e]==_b){_c.splice(_e,1);break;}}_b.destroy();this._rows.splice(_a,1);}};_pGridMatrixManager._deleteAllRow=function(){var _a=this._rows;for(var _c=0;_c<_a.length;_c++ ){_a[_c].destroy();}var _b=this._fixed_rows;for(var _c=0;_c<_b.length;_c++ ){_b[_c].destroy();}this._rows=[];this._fixed_rows=[];this._allrows=[];this._grid._setHscrollElement();this._grid._is_over_scroll=0;};_pGridMatrixManager._isShowScreenRow=function(_a,_b,_c){if(_a._rowidx<0){return true;}var _d=_b,_e=_d+_c;if(_d<_a._getPosBottom()&&_e>_a._adjust_top){return true;}return false;};_pGridMatrixManager._adjustScrollRows=function(_a,_b){var _c=this._grid,_d=_c._getGridRowCount(),_e=this._rows,_f,_g,_h=_c._getFixRowCnt(),_i=_d-1,_j=_c._getBodyClientSize()[1],_k=[],_l,_m,_n,_o,_p,_q,_r=this._band,_s=_c._is_variable_bodyrowsize,_t=0,_u=0,_v=_c._last_scroll_top;if(_a>_v){_u=1;}else if(_a<_v){_u= -1;}if(_u>0){_g=_e[_e.length-1];for(var _w=0;_w<_e.length;_w++ ){if(this._isShowScreenRow(_e[_w],_a,_r._client_height)==true){break;}_k.push(_e[_w]);}_t=_k.length;if(_t>0){if(_e.length==_t){target_rowidx=_c._toprowpos[0];for(var _w=0;_w<_t;_w++ ){_l=_k[_w];_m=target_rowidx++ ;_l._changeRow(_m,_s);_n=_l._adjust_left;_o=_l._adjust_width;_p=_c._getRowSize(_m);_q=this._getBodyRowTopPos(_m);_l.move(_n,_q,_o,_p);if(_s){_l._resetCellsSize(_c._curFormat);}}}else{target_rowidx=_g._rowidx+1;for(var _w=0;_w<_t;_w++ ){_l=_k[_w];_m=target_rowidx++ ;if(!_s&&_m>_i){break;}_l._changeRow(_m,_s);_n=_l._adjust_left;_o=_l._adjust_width;_p=_c._getRowSize(_m);_q=this._getBodyRowTopPos(_m);_l.move(_n,_q,_o,_p);if(_s){_l._resetCellsSize(_c._curFormat);}}_e.sort(function(_x,_y){return _x._rowidx-_y._rowidx;});}if(_e.length>0){_c._begrowpos=_e[0]._rowidx;_c._endrowpos=_e[_e.length-1]._rowidx;}}if(_s){this._adjustRowsDisplay(false,true);}}else if(_u<0){if(_s){this._adjustRowsDisplay(false,true);}_f=_e[0];for(var _w=_e.length-1;_w>=0;_w-- ){if(this._isShowScreenRow(_e[_w],_a,_r._client_height)==true){break;}_k.push(_e[_w]);}_t=_k.length;if(_t>0){if(_e.length==_t){target_rowidx=_c._toprowpos[0];for(var _w=_t-1;_w>=0;_w-- ){_l=_k[_w];_m=target_rowidx++ ;_l._changeRow(_m,_s);_n=_l._adjust_left;_o=_l._adjust_width;_p=_c._getRowSize(_m);_q=this._getBodyRowTopPos(_m);_l.move(_n,_q,_o,_p);if(_s){_l._resetCellsSize(_c._curFormat);}}}else{target_rowidx=_f._rowidx-1;for(var _w=0;_w<_t;_w++ ){_l=_k[_w];_m=target_rowidx-- ;if(_m<_h){break;}_l._changeRow(_m,_s);_n=_l._adjust_left;_o=_l._adjust_width;_p=_c._getRowSize(_m);_q=this._getBodyRowTopPos(_m);_l.move(_n,_q,_o,_p);if(_s){_l._resetCellsSize(_c._curFormat);}}_e.sort(function(_x,_y){return _x._rowidx-_y._rowidx;});}if(_e.length>0){_c._begrowpos=_e[0]._rowidx;_c._endrowpos=_e[_e.length-1]._rowidx;}}}else{if(_b){var _x=null;_c._toprowpos=_c._getScreenTopRowPos();_c._bottomrowpos=_c._getScreenBottomRowPos();target_rowidx=_c._toprowpos[0];_t=_e.length;_k=_e;for(var _w=0;_w<_t;_w++ ){_l=_k[_w];_m=target_rowidx++ ;if(_m>=_c.rowcount){if(_x==null){_x=_c._toprowpos[0]-1;}_m=_x-- ;if(_m<0){break;}}_l._changeRow(_m,_s);_n=_l._adjust_left;_o=_l._adjust_width;_p=_c._getRowSize(_m);_q=this._getBodyRowTopPos(_m);if(_p<0){continue;}_l.move(_n,_q,_o,_p);if(_s){_l._resetCellsSize(_c._curFormat);}}if(_e.length>0){if(_x!=null){_e.sort(function(_y,_z){return _y._rowidx-_z._rowidx;});}_c._begrowpos=_e[0]._rowidx;_c._endrowpos=_e[_e.length-1]._rowidx;}}}return _k;};delete _pGridMatrixManager;nexacro.GridBand=function(_a,_b,_c,_d,_e,_f,_g){nexacro.Component.call(this,_a,"absolute",_b,_c,_d,_e,null,null,_f);this._is_subcontrol=true;this._isBody=(_a=="body");this._refobj=_g;this._grid=_f;this._rowsizesperdatarow=null;this._datarowsheight= -1;this._colinfos=null;this._rowinfos=null;this._cellsinfo=null;this._update_rows=[];this._create_rows=[];this._text_elem=null;if(_g){_g.bandctrl=this;_g._changeStyleTarget(this);this.style=_g.style;this._styles=_g._styles;}else{this.style=new nexacro.GridBand_Style(this);}this._matrix=new nexacro.GridMatrixManager(this._grid,this);this._scrollWidth=0;this._scrollHeight=0;this._recreating=false;this._accessibility_role="none";};var _pGridBand=nexacro._createPrototype(nexacro.Component,nexacro.GridBand);nexacro.GridBand.prototype=_pGridBand;nexacro._setForControlStyleFinder(_pGridBand);_pGridBand._type_name="GridBand";nexacro.GridBand._default_accessibility=nexacro._getCachedStyleObj("accessibility","none disable all '' '' ''");_pGridBand.on_create_custom_style=function(){return null;};_pGridBand.on_create_custom_currentStyle=function(){return new nexacro.GridBand_CurrentStyle();};_pGridBand.on_update_style_opacity=function(){};_pGridBand.on_update_style_shadow=function(){};_pGridBand.on_update_style_cursor=function(){};_pGridBand.on_update_style_color=function(){};_pGridBand.on_update_style_align=function(){};_pGridBand.on_update_style_margin=function(){};_pGridBand.on_update_style_glow=function(){};_pGridBand.on_update_style_blur=function(){};_pGridBand.on_update_style_selectborder=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_cellline=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_celllinetype=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_selectcolor=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_selectline=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_selectlinetype=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_border=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_cellbackground=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_cellbackground2=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_cellcolor=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_cellcolor2=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_selectbackground=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_background=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_cellfont=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_selectfont=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_font=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_cellgradation=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_cellgradation2=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_selectgradation=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_gradation=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_cellalign=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_cellpadding=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._refresh_contents(true);};_pGridBand.on_update_style_padding=function(){this._grid._curFormat._clearCellStyleCache(this.id);this._updateClientSize(this.getElement());};_pGridBand.on_find_CurrentStyle_background=function(_a){if(!_a){_a="normal";}var _b=null;if(this._refobj){_b=this._refobj._query_pseudo_background(_a);}var _c=this._grid._getGridRowCount();if(this._isBody&&_c==0){var _d=this.parent.nodataimage;if(_d.length){var _e="transparent";if(_b){_e=_b.color;}_b=nexacro._getCachedStyleObj("background",_e+" "+_d+" center middle");}}return _b;};_pGridBand.on_find_CurrentStyle_gradation=function(_a){if(this._refobj){return this._refobj._query_pseudo_gradation(_a);}return null;};_pGridBand.on_find_CurrentStyle_padding=function(_a){return null;};_pGridBand.on_find_CurrentStyle_font=function(_a){return null;};_pGridBand.on_find_CurrentStyle_cursor=function(_a){var _b=this._grid;if(_b._global_cursor){return _b._global_cursor;}return null;};_pGridBand.on_find_CurrentStyle_shadow=function(_a){return null;};_pGridBand.on_find_CurrentStyle_opacity=function(_a){return null;};_pGridBand.on_find_CurrentStyle_align=function(_a){return null;};_pGridBand.on_find_CurrentStyle_color=function(_a){return null;};_pGridBand.on_find_CurrentStyle_accessibility=function(_a){var _b=this._find_pseudo_obj("accessibility",_a,"accessibility");if(nexacro._enableaccessibility&&nexacro._accessibilitytype==5&&this._grid.nodatatext){return nexacro.Component._default_accessibility;}else{return _b?_b:nexacro.GridBand._default_accessibility;}};_pGridBand._find_pseudo_obj=function(_a,_b,_c,_d){var _e;var _f=this.id;if(_d){_f=_d;}if(_f=="summ"||_f=="summary"){_e=this._grid._find_bandcomp_pseudo_obj("summ",_a,_b,_c);if(!_e){_e=this._grid._find_bandcomp_pseudo_obj("head",_a,_b,_c);}}else if(_f=="head"){_e=this._grid._find_bandcomp_pseudo_obj("head",_a,_b,_c);}else{_e=this._grid._find_bandcomp_pseudo_obj("body",_a,_b,_c);}return _e;};_pGridBand.on_find_CurrentStyle_rtlimagemirroring=function(_a){return this._grid.on_find_CurrentStyle_rtlimagemirroring(_a);};_pGridBand.on_create_contents=function(){var _a=this.getElement();var _b=this._grid._curFormat;if(_a&&_b){this._recreate_contents();if(this._isBody){var _c=this.currentstyle;var _d=this._text_elem=new nexacro.TextBoxElement(_a);_d.setElementSize(this._client_width,this._client_height);_d.setElementVisible(false);_d.setElementAlignXY("center","middle");_d.setElementFont(_c.font);_d.setElementColor(_c.color);_d.setElementWordWrap("char");if(this._get_rows().length==0){var _e=this.parent.nodatatext;_d.setElementText(_e);}}}};_pGridBand.on_created_contents=function(){var _a=this.getElement();var _b=this._grid._curFormat;if(_a&&_b){var _c=this._text_elem;if(_c){_c.create();}this._on_refresh_rows();var _d=this._grid;var _e=_d._getScrollLeft();var _f=_d._getScrollTop();if(_e>0){this._matrix._adjustColsDisplay();_d._absolutelyResetScrollPos(true);_d._control_element.setElementHScrollPos(_e);_d._absolutelyResetScrollPos(false);}if(_f>0){_d._absolutelyResetScrollPos(true);_d._control_element.setElementVScrollPos(_f);_d._absolutelyResetScrollPos(false);}if(nexacro._enableaccessibility&&!_d._accept_focus){var _g=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_g&&_g.enable){_d._accept_focus=true;}}}};_pGridBand._delete_style=function(){this.style=null;this._styles=null;};_pGridBand.on_destroy_contents=function(){if(this._text_elem){this._text_elem.destroy();this._text_elem=null;}if(this._refobj){this._refobj.bandctrl=null;this._refobj=null;}this._rows=null;this._grid=null;this._matrix.destroy();this._matrix=null;this._colinfos=null;this._rowinfos=null;this._cellsinfo=null;this._update_rows=null;this._create_rows=null;this._rowsizesperdatarow=null;};_pGridBand.on_change_containerRect=function(_a,_b){if(this._recreating){return;}if(this._text_elem){var _d=this._grid._getAvailableRect(this);this._text_elem.setElementPosition(_d.left,_d.top);this._text_elem.setElementSize(_d.width,_d.height);}var _c=this._grid;if(_c._no_update_bandrect){return;}if(_c._is_changingRect){_c._resetRowSizeList();_c._resetColSizeList();}if(this._isBody){var _e=_c._getScrollTop();if(_e<0){_e=0;}_c._last_scroll_top=_e;_c._toprowpos=_c._getScreenTopRowPos(_e);_c._bottomrowpos=_c._getScreenBottomRowPos(_e);this._matrix._adjustRowsDisplay(true);this._matrix._adjustColsDisplay();this._update_rows=this._matrix._adjustScrollRows(_e,true);}else{this._matrix._adjustRowsDisplay(true);this._matrix._adjustColsDisplay();}this._on_refresh_rows();};_pGridBand.on_create_control_element=function(_a){var _b=new nexacro.GridBandControlElement(_a,this.id);_b.setLinkedControl(this);this._control_element=_b;return _b;};_pGridBand.on_apply_custom_setfocus=function(_a){nexacro.Component.prototype.on_apply_custom_setfocus.call(this,_a);if(nexacro._enableaccessibility){this._grid._currentBand=this.id;if(this.id=="head"){this._grid._currentDSrow= -1;}else if(this.id=="summ"){this._grid._currentDSrow= -2;}else{this._grid._currentDSrow=0;}}};_pGridBand.on_get_style_accessibility_label=function(){return this.id;};_pGridBand._setAccessibilityStatFocus=function(_a){var _b=this.on_find_CurrentStyle_accessibility(this._pseudo);var _c=this._getAccessibilityLabel(_b);if(this._isBody&&this._grid.rowcount<=0){_c+=(this._grid.nodatatext)?this._grid.nodatatext:"";this._setAccessibilityLabel(_c);}nexacro.Component.prototype._setAccessibilityStatFocus.call(this,_a);};_pGridBand._setAccessibilityNotifyEvent=function(_a){if(this._isBody&&this._grid.rowcount<=0&&this._grid.nodatatext){var _b=this._grid.nodatatext;this._setAccessibilityLabel(_b);return nexacro.Component.prototype._setAccessibilityNotifyEvent.call(this,_a);}};_pGridBand.on_apply_prop_class=function(){var _a=this._grid._curFormat;if(_a){_a._clearCellStyleCache(this.id);}nexacro.Component.prototype.on_apply_prop_class.call(this);this._refresh_contents(true);};_pGridBand.on_apply_wordwrap=function(){this._refresh_contents();};_pGridBand.on_apply_prop_tooltip=function(){var _a=this.getElement();this.tooltiptext=this._refobj._getTooltipText();if(_a){if(this.tooltiptext!=""){_a.setElementToolTip(this.tooltiptext);}}};_pGridBand.on_apply_text=function(){if(this._text_elem){if(this._isBody&&this._get_rows().length==0){var _a=this.parent.nodatatext;var _b=this.parent.on_find_CurrentStyle_font();var _c=this.parent.on_find_CurrentStyle_color();this._text_elem.setElementVisible(_a?true:false);this._text_elem.setElementText(_a);this._text_elem.setElementFont(_b);this._text_elem.setElementColor(_c);}else{this._text_elem.setElementVisible(false);}}};_pGridBand.on_apply_prop_rtldirection=function(){nexacro.Component.prototype.on_apply_prop_rtldirection.call(this);var _a=this._matrix._rows;var _b=this._rtldirection;if(_a){var _c;for(var _d=0;_d<_a.length;_d++ ){_a[_d]._setRtlDirection(_b);}}this._matrix._adjustColsDisplay(true);};_pGridBand.on_fire_onclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(this.parent.onnodataareaclick&&this.parent.onnodataareaclick._has_handlers){return this.parent.on_fire_onnodataareaclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k.parent,_l);}return false;};_pGridBand.on_fire_ondblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(this.parent.onnodataareadblclick&&this.parent.onnodataareadblclick._has_handlers){return this.parent.on_fire_onnodataareadblclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k.parent,_l);}return false;};_pGridBand._on_refresh_rows=function(_a,_b){if(this._control_element._handle){var _c=this._grid;if(this._update_rows.length>0||this._create_rows.length>0){var _d=this._update_rows;var _e=this._create_rows;var _f=this._get_rows();var _g=this._control_element;this._on_refresh_rows_physical(_d,_e,_a,_b);this._update_rows=[];this._create_rows=[];}this.on_apply_text();_c._applyResizer();}};_pGridBand._on_refresh_rows_physical=function(_a,_b,_c,_d){var _e=_a.length;var _f=_b.length;if(this._isBody){var _g=this._grid;if(_g._is_created==true){var _h=this._get_rows();var _i=_h.length;if(!_d){_g._suppressUpdate();}for(var _j=0;_j<_f;_j++ ){var _k=_b[_j];_k._is_scrollproc=true;if(_k._is_alive){_k._updateAll();}}var _l=false;if(_i!=_e){_l=(!_g._isUseBindExprOuterStyle("body")&&!_g._is_variable_bodyrowsize&&!_g._is_use_fakemerge);}for(var _j=0;_j<_e;_j++ ){_a[_j]._is_scrollproc=true;if(_a[_j]._is_alive){_a[_j]._updateAll(undefined,undefined,_l);}}if(_g._is_use_suppress){if(_f>0||_e>0){var _m=_g._curFormat._bodycells,_n=_m.length;var _o,_p,_q;for(var _r=0;_r<_i;_r++ ){if(_h[_r]._is_scrollproc){_h[_r]._is_scrollproc=undefined;continue;}_p=_h[_r]._rowidx;_q=(_g._hasTree)?_g._treeIndexes[_p]:_p;for(var _j=0;_j<_n;_j++ ){if(_m[_j].suppress!=0){if(_h[_r]){_o=_h[_r]._cells[_j];var _s=_o._getSuppressInfo();if(_o._border_proc==_s.border_proc&&_o._text_proc==_s.text_proc){continue;}this._refreshRowCell(_r,_j,_g._isSelectedCell(_j,_q));}}}}}}}}else{for(var _j=0;_j<_f;_j++ ){_b[_j]._updateAll();}for(var _j=0;_j<_e;_j++ ){_a[_j]._updateAll();}}for(var _j=0;_j<_f;_j++ ){_b[_j].on_created();}};_pGridBand._on_last_lbuttonup=function(){this.parent._on_last_lbuttonup();};_pGridBand._on_last_keyup=function(){this.parent._on_last_keyup();};_pGridBand._refreshRowCell=function(_a,_b,_c,_d,_e){var _f=this._get_rows();var _g=_f[_a]._cells;var _h=this._grid;var _i=_g[_b];if(!_i){return;}_i._selected=_c;var _j=_i.subcells;var _k=_j.length;for(var _l=0;_l<_k;_l++ ){_j[_l]._selected=_c;}_i._updateAll(_d,_e);};_pGridBand._refreshRow=function(_a,_b,_c){var _d=this._get_rows();var _e=_d[_a];_e._updateAll(_b,false,undefined,_c);};_pGridBand._refreshCelltype=function(_a,_b){var _c=this.parent._curFormat;function checktype(_d,_a){var _e=_d.length;for(var _f=0;_f<_e;_f++ ){if(_d[_f].celltype==_a){return true;}}return false;};if(_a=="head"){if(_c._bodycells){if(checktype(_c._bodycells,_a)){if(_b){this._grid._curFormat._clearCellStyleCache("body");}this.parent._refreshBody(_b);}}if(_c._summcells){if(checktype(_c._summcells,_a)){if(_b){this._grid._curFormat._clearCellStyleCache("summ");}this.parent._refreshSumm(_b);}}}else if(_a=="summary"){if(_c._bodycells){if(checktype(_c._bodycells,_a)){if(_b){this._grid._curFormat._clearCellStyleCache("body");}this.parent._refreshBody(_b);}}if(_c._headcells){if(checktype(_c._headcells,_a)){if(_b){this._grid._curFormat._clearCellStyleCache("head");}this.parent._refreshHead(_b);}}}else{if(_c._summcells){if(checktype(_c._summcells,_a)){if(_b){this._grid._curFormat._clearCellStyleCache("summ");}this.parent._refreshSumm(_b);}}if(_c._headcells){if(checktype(_c._headcells,_a)){if(_b){this._grid._curFormat._clearCellStyleCache("head");}this.parent._refreshHead(_b);}}}};_pGridBand._refresh_contents=function(_a){if(_a){var _b=this._get_rows();var _c=_b.length;var _d,_e,_f;for(var _g=0;_g<_c;_g++ ){_d=_b[_g]._cells;_e=_d.length;for(var _h=0;_h<_e;_h++ ){_f=_d[_h];_f.currentstyle._empty();}}}if(this.id=="head"){this.parent._refreshHead(_a);this._refreshCelltype("head",_a);}else if(this.id=="summ"){this.parent._refreshSumm(_a);this._refreshCelltype("summary",_a);}else{this.parent._refreshBody(_a);this._refreshCelltype("body",_a);}};_pGridBand._isEnable=function(){if(this._grid){return this._grid._isEnable();}return true;};_pGridBand._get_cols=function(_a){var _b=_a._cols,_c=_b.length,_d,_e=[],_f=[],_g=[];for(var _h=0;_h<_c;_h++ ){_d=_b[_h];if(_d._area=="left"){_e.push(_d.size);}else if(_d._area=="right"){_f.push(_d.size);}else{_g.push(_d.size);}}this._colinfos=_b;return [_g,_e,_f];};_pGridBand._recreate_contents=function(_a,_b,_c,_d,_e){var _f=this._grid,_g=_f._curFormat,_h;this._matrix._init();if(!_g){return;}this._create_rows=[];this._update_rows=[];this._rowsizesperdatarow=[];this._recreating=true;if(this.id=="head"){_h=_g._headrows;this._datarowsheight=_g.headHeight;}else if(this.id=="summ"){_h=_g._summrows;this._datarowsheight=_g.summHeight;}else{_h=_g._bodyrows;_f._rowheight=this._datarowsheight=_g._body_height;}var _i=_h?_h.length:0,_j;for(var _r=0;_r<_i;_r++ ){this._rowsizesperdatarow.push(_h[_r].size);}var _k=(_f.hscrollbar)?_f.hscrollbar.pos:0,_l=(_f.vscrollbar)?_f.vscrollbar.pos:0,_m=(_f.vscrollbar)?_f.vscrollbar._pos:0,_n=_g.bodyWidth,_o=0;if(this._isBody){this._control_element._setFixArea(_f._fixed_height);this._client_height=this._control_element.client_height;if(!_c&&!_d){_f._hideEditor();}var _s=_f._getGridRowCount();var _t=_f._rowSizeList,_u,_v=[],_w=1,_x=1500000;for(var _r=0;_r<_s;_r++ ){_u=_f._getDataRow(_r);_o+=_t[_u];if(_o-_f._fixedrow_height>=_x*_w){_v.push(_o-_t[_u]);_w++ ;}}_o-=_f._fixedrow_height;_v.push(_o);this._scrollHeight=_o;this._scrollWidth=_n;var _y=_f._no_update_bandrect;_f._no_update_bandrect=true;_f._setScrollMaxSize(this._scrollWidth,this._scrollHeight,_v);_f._no_update_bandrect=_y;var _z=_f._control_element.vscroll_limit;if(_m<0){_m=0;}else if(_m>_z){_m=_z;}_f._toprowpos=_f._getScreenTopRowPos(_m);_f._bottomrowpos=_f._getScreenBottomRowPos(_m);if(_m==0){this._matrix._adjustRowsDisplay();this._matrix._async_create_page();}else{this._matrix._adjustRowsDisplay();}if(!_f._headBand&&!_f._summBand){_f._setScrollMaxSize(this._scrollWidth,this._scrollHeight,_v);}if(_f._is_created&&!_f._autofiting){this._on_refresh_rows(false,_e);_f._applyAutofittype(true);}}else{this._scrollWidth=_n;this._matrix._adjustRowsDisplay();_f._setScrollMaxSize(this._scrollWidth);if(_f._is_created&&!_f._autofiting){this._on_refresh_rows(false,_e);}}var _p=_f._find_lastFocused();if(_p==_f){_f._control_element.setElementFocus();}var _q=_f._control_element.hscroll_limit;if(_k<0){_k=0;}else if(_k>_q){_k=_q;}if(this._isBody){if(_k>0){if(_b){_f.hscrollbar.set_pos(0);_f._control_element.setElementHScrollPos(0);}else{if(_f._control_element._target_hscroll_elements){this._matrix._adjustColsDisplay();_f._absolutelyResetScrollPos(true);_f._control_element.setElementHScrollPos(_k);_f._absolutelyResetScrollPos(false);}}}if(_m>0){if(_b){_f.vscrollbar.set_pos(0);this._control_element.setElementVScrollPos(0);this._is_over_scroll=0;}else{_f._absolutelyResetScrollPos(true);_f._control_element.setElementVScrollPos(_m);_f._absolutelyResetScrollPos(false);}}_f._control_element._scroll_left=_k;_f._control_element._scroll_top=_l;}else{if(_k>0){if(_b){_f.hscrollbar.set_pos(0);_f._control_element.setElementHScrollPos(0);}else{this._matrix._adjustColsDisplay();_f._absolutelyResetScrollPos(true);_f._control_element.setElementHScrollPos(_k);_f._absolutelyResetScrollPos(false);}}_f._control_element._scroll_left=_k;}this._recreating=false;};_pGridBand._get_rows=function(){return this._matrix._getAllRows();};_pGridBand._get_row=function(_a){if(!this._is_created){return null;}var _b=this._get_rows();var _c=(_b)?_b.length:0;var _d;var _e=this._grid;var _f;for(var _g=0;_g<_c;_g++ ){_f=_e._getDataRow(_b[_g]._rowidx);if(_a==_f){return _b[_g];}}return null;};_pGridBand._updateAll=function(_a){if(this.getElement()){if(_a){this.currentstyle._empty();this._control_pseudo="";this._contents_pseudo="";}this.on_apply_pseudo(this._pseudo);}};delete _pGridBand;nexacro.GridScrollBarCtrl=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){nexacro.ScrollBarCtrl.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i);this._grid=_i;};var _pGridScrollBarCtrl=nexacro.GridScrollBarCtrl.prototype=nexacro._createPrototype(nexacro.ScrollBarCtrl,nexacro.GridScrollBarCtrl);nexacro._setForTypedControlStyleFinder(_pGridScrollBarCtrl);_pGridScrollBarCtrl._type_name="GridScrollBarControl";_pGridScrollBarCtrl.on_destroy_contents=function(){nexacro.ScrollBarCtrl.prototype.on_destroy_contents.call(this);this._grid=null;};_pGridScrollBarCtrl._set_rowpos=function(_a,_b){var _c=this._grid;_a-=_c._getFixRowCnt();if(_c._scrollpixel=="all"){_a=this._scroll_convert_pixel(_a,true);}this._no_set_scrollinfo=true;this._setPos(_a,_b);this._no_set_scrollinfo=false;};_pGridScrollBarCtrl._set_pixelpos=function(_a,_b){var _c="none";if(_b=="mousewheel"){_c=this._getScrollInfo(_a);}if(_athis._max){_a=this._max;}this._no_set_scrollinfo=true;if(this._pos!=_a){this.pos=this._scroll_reverse_convert(_a)[0];this._pos=_a;var _d=this._rectShaft;this._resetTrackBar(_d.left,_d.top,_d.right,_d.bottom);}this.on_fire_onscroll(this.pos,_c);this._no_set_scrollinfo=false;};_pGridScrollBarCtrl._scroll_convert_pixel=function(_a,_b){var _c=this._grid;var _d=_c._bodyBand;if(_c._scrollpixel!="all"||_b){if(this.direction=="vert"){if(_d){var _e=_c._getFixRowCnt();var _f=_a+_e;if(_c._is_variable_bodyrowsize){var _g=0,_h;for(var _i=_e;_i<_f;_i++ ){_h=_c._getDataRow(_i);_g+=_c._rowSizeList[_h];}_a=_g;}else{_a=(_f-_e)*_d._datarowsheight;}}}}return _a;};_pGridScrollBarCtrl._scroll_reverse_convert=function(_a,_b,_c){var _d=this._grid;var _e=_d._bodyBand;var _f=_a;if(_d._scrollpixel!="all"||_b){if(this.direction=="vert"){if(_e){if(_d._is_variable_bodyrowsize){var _g=_d._getFixRowCnt();var _h=_d._getGridRowCount();var _i=0,_j=0;if(_c){for(var _k=_g;_k<_h;_k++ ){_j=_d._getDataRow(_k);if(_a<=_i){_j=_k;_f=_i;break;}_i+=_d._rowSizeList[_j];}}else{for(var _k=_g;_k<_h;_k++ ){_j=_d._getDataRow(_k);if(_a<_i){_j=_k-1;if(_d._rowSizeList[_j]>_e._client_height){if(_i-_a<_e._client_height){_f=_i-_e._client_height;}}else{_f=_i-_d._rowSizeList[_j];}break;}_i+=_d._rowSizeList[_j];}}_a=_j;_a-=_g;}else{var _i=0,_j=0;if(_c){if(_a>0){_j=Math.ceil(_a/_e._datarowsheight);}_f=_j*_e._datarowsheight;}else{if(_a>0){_j=Math.floor(_a/_e._datarowsheight);}_i=_e._datarowsheight*(_j+1);if(_e._datarowsheight>_e._client_height){if(_i-_a<_e._client_height){_f=_i-_e._client_height;}}else{_f=_j*_e._datarowsheight;}}_a=_j;}}}}return [_a,_f];};_pGridScrollBarCtrl.on_incbutton_lbuttondown=function(_a){this._no_set_scrollinfo=true;nexacro.ScrollBarCtrl.prototype.on_incbutton_lbuttondown.call(this,_a);this._no_set_scrollinfo=false;};_pGridScrollBarCtrl.on_decbutton_lbuttondown=function(_a){this._no_set_scrollinfo=true;nexacro.ScrollBarCtrl.prototype.on_decbutton_lbuttondown.call(this,_a);this._no_set_scrollinfo=false;};_pGridScrollBarCtrl._getIncNewPosPixel=function(){var _a=this._grid;var _b,_c;if(this.direction=="vert"){if(_a._scrollpixel!="all"){_c=this.pos;}else{_c=this._scroll_reverse_convert(this.pos,true)[0];}_b=this._scroll_convert_pixel(_c+1,true);}return _b;};_pGridScrollBarCtrl._getDecNewPosPixel=function(){var _a=this._grid;var _b,_c;if(this.direction=="vert"){if(_a._scrollpixel!="all"){_c=this.pos;}else{_c=this._scroll_reverse_convert(this.pos,true)[0];}_b=this._scroll_convert_pixel(_c-1,true);}return _b;};_pGridScrollBarCtrl._setScrollPos=function(_a){nexacro.ScrollBarCtrl.prototype._setScrollPos.call(this,_a);var _b=this._grid;if(_b._scrollpixel!="all"){_b._is_over_scroll=0;if(this._pos>this._orgmax){_b._is_over_scroll=this._pos-this._orgmax;}}};delete _pGridScrollBarCtrl;nexacro.Grid=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){nexacro.Component.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i);this._event_list={"onclick":1,"ondblclick":1,"onkillfocus":1,"onsetfocus":1,"onkeypress":1,"onkeydown":1,"onkeyup":1,"onlbuttondown":1,"onlbuttonup":1,"onrbuttondown":1,"onrbuttonup":1,"onmousedown":1,"onmouseup":1,"onmouseenter":1,"onmouseleave":1,"onmousemove":1,"onmousewheel":1,"ondrag":1,"ondragenter":1,"ondragleave":1,"ondragmove":1,"ondrop":1,"onmove":1,"onsize":1,"ongesture":1,"onvscrolllastover":1,"onvscroll":1,"onhscroll":1,"onvtracklast":1,"oncellclick":1,"onheadclick":1,"onsummclick":1,"oncelldblclick":1,"onheaddblclick":1,"onsummdblclick":1,"onnodataareaclick":1,"onnodataareadblclick":1,"onselectchanged":1,"onselectchanged":1,"onformatchanged":1,"onenteredit":1,"onenterdown":1,"cantreestatuschange":1,"ontreestatuschanged":1,"onsubselectchanged":1,"onsubselectchanged":1,"oncolresizing":1,"onrowresizing":1,"ondropdown":1,"oncloseup":1,"onitemchanged":1,"onexpanddown":1,"onexpandup":1,"onchar":1,"ontextchange":1,"ontextchanged":1,"oncolresized":1,"onrowresized":1,"ontouchstart":1,"ontouchmove":1,"ontouchend":1,"onflingstart":1,"onfling":1,"onflingend":1,"onpinchstart":1,"onpinch":1,"onpinchend":1,"onlongpress":1,"onslidestart":1,"onslide":1,"onslideend":1};this._is_scrollable=true;this._formats={};this._curFormat=null;this._headBand=null;this._summBand=null;this._bodyBand=null;this._exprcache={};this._selectstartrow=[];this._selectstartcol=[];this._selectstartsubrow=[];this._selectstartpvt=[];this._selectendrow=[];this._selectendcol=[];this._selectendsubrow=[];this._selectendpvt=[];this._resizerCols=[];this._resizerRows=[];this._imgsize_cache={};this._rowSizeListSub=[];this._rowSizeList=[];this._rowHeadListSub=[];this._rowHeadList=[];this._rowSummListSub=[];this._rowSummList=[];this._begrowpos=0;this._endrowpos=0;this._toprowpos=[0,0];this._bottomrowpos= -1;this._selectinfo={rows:[],selects:[],ctrlpoint:{"cell": -1,"col": -1,"subrow": -1,"row": -9,"colspan": -1,"rowspan": -1,"_init":function(){this.cell= -1;this.col= -1;this.subrow= -1;this.row= -9;this.colspan= -1;this.rowspan= -1;this.subrowslen=0;this.area="";},"_set":function(_j,_k,_l){this.cell=_j._cellidx;this.col=_j._col;this.subrow=_j._row;this.row=_k;this.colspan=_j._colspan;this.rowspan=_j._rowspan;this.subrowslen=_l;this.area=_j._area;}},area:[],"curcell": -1,"curcol": -1,"curpvt": -9,"cursubrow": -1,"curdsrow": -1,"currow": -9,"getSelectCells":function(_j){return this.selects[_j+2];},arearect:{left:0,top:0,width:0,height:0,barea:"",earea:""}};this._text_elem=null;this._is_use_suppress=false;this._recreate_contents_proc=[];this._keydown_elem=null;this._tree_load_all=null;this._image_load_all=null;this._is_editor_keyaction=true;this._focus_proc=null;this._after_recreate_contents_all=null;this._is_async_recreate=false;this._is_after_recreate=false;this._accessibility_role="grid";this._accept_arrow=false;this._accept_focus=false;this._first_focus=false;this._is_first_bodycell=false;this._is_band_focus=false;this._beforegridrowpos= -1;this._beforegridcolpos= -1;this.accessibilityreadbandlabel=true;this.controlbutton=new nexacro.GridControlButton("controlbutton",0,0,0,0,this,false,true);this.controlcalendar=new nexacro.GridControlCalendar("controlcalendar",0,0,0,0,this,false,true);this.controlcheckbox=new nexacro.GridControlCheckbox("controlcheckbox",0,0,0,0,this,true);this.controlcombo=new nexacro.GridControlCombo("controlcombo",0,0,0,0,this,false,true);this.controledit=new nexacro.GridControlEdit("controledit",0,0,0,0,this,false,true);this.controlmaskedit=new nexacro.GridControlMaskEdit("controlmaskedit",0,0,0,0,this,true);this.controltextarea=new nexacro.GridControlTextArea("controltextarea",0,0,0,0,this,false,true);this.controlprogressbar=new nexacro.GridControlBar("controlprogressbar",0,0,0,0,this,true);this.controlexpand=new nexacro.GridExpand(this,0,0,0,0,true);this._aniframe_rowscroll=null;this._aniframe_colscroll=null;this._is_use_bind_expr_prop={body:null,head:null,summ:null};this._is_use_bind_expr_style={body:false,head:false,summ:false};this._is_use_bind_expr_outerstyle={body:false,head:false,summ:false};this._select_ctrl=null;this._format_str=null;this._destroyeditors=[];this._track_point={x: -1,y: -1};this._track_idx= -1;this._track_start_info=null;this._track_mode="";this._overlay_elements=[];this._func_queue=[];this._recalcXY_info=null;this._fake_mergecell_arr=[];this._enable_redraw_history={};this._temphead=this._tempsumm=null;};var _pGrid=nexacro._createPrototype(nexacro.Component,nexacro.Grid);nexacro.Grid.prototype=_pGrid;_pGrid._type_name="Grid";_pGrid._rowheight=24;_pGrid._rowcount=0;_pGrid._rowposition= -1;_pGrid._beforeheadcellpos= -1;_pGrid._beforeheadrowpos= -1;_pGrid._beforeheadcolpos= -1;_pGrid._beforeheadsubrowpos= -1;_pGrid._beforebodycellpos= -1;_pGrid._beforebodyrowpos= -1;_pGrid._beforebodycolpos= -1;_pGrid._beforebodysubrowpos= -1;_pGrid._beforepvt= -9;_pGrid._beforesummcellpos= -1;_pGrid._beforesummrowpos= -1;_pGrid._beforesummcolpos= -1;_pGrid._beforesummsubrowpos= -1;_pGrid._multiselect="none";_pGrid._bodyrowheight=0;_pGrid._mouseRowPos= -9;_pGrid._mouseovercell=null;_pGrid._mouseCellPos= -1;_pGrid._dsEventOccured=false;_pGrid._bPivotGrid=false;_pGrid._showEditorCell=false;_pGrid._showEditRowIdx= -1;_pGrid._showEditCellIdx= -1;_pGrid._dbclickPreCell= -1;_pGrid._dbclickPreCol= -1;_pGrid._dbclickPreRow= -9;_pGrid._dbclickPreSubrow= -1;_pGrid._dbclickPrePvt= -9;_pGrid._lbuttondown_proc=false;_pGrid._bDragArea=false;_pGrid._nDragRow= -1;_pGrid._nDragCell= -1;_pGrid._nDragPivot= -9;_pGrid._nDragEndRow= -1;_pGrid._nDragEndCell= -1;_pGrid._nDragEndCol= -9;_pGrid._nDragBand= -1;_pGrid._bShiftClick=false;_pGrid._selectClear=false;_pGrid._acceptstab=true;_pGrid.vscrollbar=null;_pGrid.hscrollbar=null;_pGrid.scrollbars="autoboth";_pGrid._scrollbars=3;_pGrid.body=null;_pGrid.head=null;_pGrid.summ=null;_pGrid.summary=null;_pGrid.currentcell= -1;_pGrid.currentcol= -1;_pGrid.currentpivot= -9;_pGrid.currentsubrow= -1;_pGrid.currentrow= -9;_pGrid._currentDSrow= -1;_pGrid._currentBand="body";_pGrid.selectcount=0;_pGrid.selectstartrow= -9;_pGrid.selectstartcol= -1;_pGrid.selectstartsubrow= -1;_pGrid.selectstartpivot= -9;_pGrid.selectendrow= -9;_pGrid.selectendcol= -1;_pGrid.selectendsubrow= -1;_pGrid.selectendpivot= -9;_pGrid.pagerowcount=0;_pGrid._pagerowcnt=0;_pGrid.rowcount=0;_pGrid.pivotcount=0;_pGrid._disprowcnt=0;_pGrid._displaycalendarctrl=null;_pGrid.fillareatype="none";_pGrid._resetfillarea=false;_pGrid.scrollpixel="default";_pGrid._scrollpixel=(nexacro.isTouchInteraction)?"all":"none";_pGrid._selectscrollmode=(nexacro.isTouchInteraction)?"scroll":"select";_pGrid.dragscrolltype="all";_pGrid.hideendline="none";_pGrid.userdata="";_pGrid.nodataimage="";_pGrid.nodatatext="";_pGrid.summarytype="default";_pGrid.suppresslevel="sameskip";_pGrid.useselcolor=true;_pGrid.autoupdatetype="none";_pGrid.cellclickbound="control";_pGrid.cellmovingtype="none";_pGrid.cellsizebandtype="body";_pGrid.cellsizingtype="none";_pGrid.extendsizetype="none";_pGrid.readonly=false;_pGrid.selectbandtype="default";_pGrid.selectchangetype="down";_pGrid.selecttype="row";_pGrid.wheelscrollrow=3;_pGrid.usecontrolkey=true;_pGrid.treeusebutton="use";_pGrid.treeuseline=true;_pGrid.treeusecheckbox=true;_pGrid.treeuseimage=true;_pGrid.treeuseexpandkey=false;_pGrid.treeinitstatus="collapse,null";_pGrid.treepathdelimiter=".";_pGrid.useinputpanel=false;_pGrid._enable=true;_pGrid._changeDisplayer=false;_pGrid._autoSizeRowProc=false;_pGrid._iskey_movetocell=false;_pGrid.binddataset="";_pGrid._binddataset=null;_pGrid._userRowposChange=false;_pGrid._create_selection=null;_pGrid.formatid="";_pGrid.formats="";_pGrid.locale="";_pGrid.areaselecttype="limitband";_pGrid.autoenter="none";_pGrid.autofitbandtype="body";_pGrid.autofitminheight=100;_pGrid.autofitminwidth=100;_pGrid.autofittype="none";_pGrid.autosizingtype="none";_pGrid.autosizebandtype="body";_pGrid.selectscrollmode="default";_pGrid._colautofit=false;_pGrid._rowautofit=false;_pGrid._autofiting=false;_pGrid._bodyAutoSize=true;_pGrid._headAutoSize=false;_pGrid._summAutoSize=false;_pGrid._AutoSizeLcol=false;_pGrid._AutoSizeRcol=false;_pGrid._rowSizeEx=false;_pGrid._noInternalvscroll=false;_pGrid._is_variable_bodyrowsize=false;_pGrid._bGridCtrlLdown=false;_pGrid._locale="";_pGrid._currentCompositionStatus="none";_pGrid._currentCompositionData="";_pGrid._fixed_startrow= -9;_pGrid._fixed_endrow= -9;_pGrid._fixed_height=0;_pGrid._fixedrow_height=0;_pGrid._fixed_rowcnt=0;_pGrid._fixed_row_scrolling=false;_pGrid._accessibility_row= -1;_pGrid._accessibility_cellidx= -1;_pGrid.on_apply_custom_pseudo=function(_a){var _b=this.currentstyle;var _c=this.on_find_CurrentStyle_font(_a);if(_b.font!=_c){_b.font=_c;this.on_apply_style_font(_c);}var _d=this.on_find_CurrentStyle_color(_a);if(_b.color!=_d){_b.color=_d;this.on_apply_style_color(_d);}var _e=this.on_find_CurrentStyle_align(_a);if(_b.align!=_e){_b.align=_e;this.on_apply_style_align(_e);}var _f=this.on_find_CurrentStyle_linetype(_a);if(_b.linetype!=_f){_b.linetype=_f;this.on_apply_style_linetype(_f);}var _g=this.on_find_CurrentStyle_line(_a);if(_b.line!=_g){_b.line=_g;this.on_apply_style_line(_g);}var _h=this.on_find_CurrentStyle_selectline(_a);if(_b.selectline!=_h){_b.selectline=_h;this.on_apply_style_selectline(_h);}var _i=this.on_find_CurrentStyle_selectlinetype(_a);if(_b.selectlinetype!=_i){_b.selectlinetype=_i;this.on_apply_style_selectline(_i);}var _j=this.on_find_CurrentStyle_treeclosebuttonimage(_a);if(_b.treeclosebuttonimage!=_j){_b.treeclosebuttonimage=_j;this.on_apply_style_treeclosebuttonimage(_j);}var _k=this.on_find_CurrentStyle_treecollapseimage(_a);if(_b.treecollapseimage!=_k){_b.treecollapseimage=_k;this.on_apply_style_treecollapseimage(_k);}var _l=this.on_find_CurrentStyle_treeexpandimage(_a);if(_b.treeexpandimage!=_l){_b.treeexpandimage=_l;this.on_apply_style_treeexpandimage(_l);}var _m=this.on_find_CurrentStyle_treeitemimage(_a);if(_b.treeitemimage!=_m){_b.treeitemimage=_m;this.on_apply_style_treeitemimage(_m);}var _n=this.on_find_CurrentStyle_treelinetype(_a);if(_b.treelinetype!=_n){_b.treelinetype=_n;this.on_apply_style_treeitemimage(_n);}var _o=this.on_find_CurrentStyle_treeopenbuttonimage(_a);if(_b.treeopenbuttonimage!=_o){_b.treeopenbuttonimage=_o;this.on_apply_style_treeopenbuttonimage(_o);}var _p=this.on_find_CurrentStyle_rtlimagemirroring(_a);if(_b.rtlimagemirroring!=_p){_b.rtlimagemirroring=_p;this.on_apply_style_rtlimagemirroring(_p);}};_pGrid.on_create_custom_style=function(){return new nexacro.Grid_Style(this);};_pGrid.on_create_custom_currentStyle=function(){return new nexacro.Grid_CurrentStyle();};_pGrid.on_find_CurrentStyle_cursor=function(_a){if(this._global_cursor){return this._global_cursor;}return nexacro.Component.prototype.on_find_CurrentStyle_cursor.call(this,_a);};_pGrid.on_find_CurrentStyle_line=function(_a){return this._find_pseudo_obj("line",_a,"line");};_pGrid.on_find_CurrentStyle_selectline=function(_a){return this._find_pseudo_obj("selectline",_a);};_pGrid.on_find_CurrentStyle_linetype=function(_a){return this._find_pseudo_obj("linetype",_a);};_pGrid.on_find_CurrentStyle_selectlinetype=function(_a){return this._find_pseudo_obj("selectlinetype",_a);};_pGrid.on_find_CurrentStyle_focusborder=function(_a){return this._find_pseudo_obj("focusborder",_a,"border");};_pGrid.on_find_CurrentStyle_treeclosebuttonimage=function(_a){return this._find_pseudo_obj("treeclosebuttonimage",_a);};_pGrid.on_find_CurrentStyle_treecollapseimage=function(_a){return this._find_pseudo_obj("treecollapseimage",_a);};_pGrid.on_find_CurrentStyle_treeexpandimage=function(_a){return this._find_pseudo_obj("treeexpandimage",_a);};_pGrid.on_find_CurrentStyle_treeitemimage=function(_a){return this._find_pseudo_obj("treeitemimage",_a);};_pGrid.on_find_CurrentStyle_treelinetype=function(_a){return this._find_pseudo_obj("treelinetype",_a,"line");};_pGrid.on_find_CurrentStyle_treeopenbuttonimage=function(_a){return this._find_pseudo_obj("treeopenbuttonimage",_a);};_pGrid.on_find_CurrentStyle_selectpointimage=function(_a){return this._find_pseudo_obj("selectpointimage",_a);};_pGrid.on_find_CurrentStyle_background=function(_a){var _b=this._getGridRowCount();var _c=nexacro.Component.prototype.on_find_CurrentStyle_background.call(this,_a);if(this.getElement()&&_b==0&&this._bodyBand==null&&this._is_created){var _d=this.nodataimage;if(_d.length){var _e="transparent";if(_c){_e=_c.color;}_c=nexacro._getCachedStyleObj("background",_e+" "+_d+" center middle");}}return _c;};_pGrid.on_find_CurrentStyle_align=function(_a){return this._find_pseudo_obj("align",_a,"align");};_pGrid.on_update_style_cursor=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_cursor(this.currentstyle.cursor=this.on_find_CurrentStyle_cursor(this._pseudo));this._refreshAll();};_pGrid.on_update_style_background=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_background(this.currentstyle.background=this.on_find_CurrentStyle_background(this._pseudo));};_pGrid.on_update_style_gradation=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_gradation(this.currentstyle.gradation=this.on_find_CurrentStyle_gradation(this._pseudo));};_pGrid.on_update_style_font=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_font(this.currentstyle.font=this.on_find_CurrentStyle_font(this._pseudo));};_pGrid.on_update_style_padding=function(){if(this._is_created){this._clearAllStyleCache();}var _a=this.currentstyle.padding=this.on_find_CurrentStyle_padding(this._pseudo);this._control_element.setElementPadding(_a);this._updateClientSize(this._control_element);};_pGrid.on_update_style_align=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_align(this.currentstyle.align=this.on_find_CurrentStyle_align(this._pseudo));};_pGrid.on_update_style_color=function(){if(this._is_created){this._clearAllStyleCache();}nexacro.Component.prototype.on_update_style_color.call(this);};_pGrid.on_update_style_line=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_line(this.currentstyle.line=this.on_find_CurrentStyle_line(this._pseudo));};_pGrid.on_update_style_linetype=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_linetype(this.currentstyle.linetype=this.on_find_CurrentStyle_linetype(this._pseudo));};_pGrid.on_update_style_selectline=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_selectline(this.currentstyle.selectline=this.on_find_CurrentStyle_selectline(this._pseudo));};_pGrid.on_update_style_selectlinetype=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_selectlinetype(this.currentstyle.selectlinetype=this.on_find_CurrentStyle_selectlinetype(this._pseudo));};_pGrid.on_update_style_treeclosebuttonimage=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_treeclosebuttonimage(this.currentstyle.treeclosebuttonimage=this.on_find_CurrentStyle_treeclosebuttonimage(this._pseudo));};_pGrid.on_update_style_treecollapseimage=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_treecollapseimage(this.currentstyle.treecollapseimage=this.on_find_CurrentStyle_treecollapseimage(this._pseudo));};_pGrid.on_update_style_treeexpandimage=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_treeexpandimage(this.currentstyle.treeexpandimage=this.on_find_CurrentStyle_treeexpandimage(this._pseudo));};_pGrid.on_update_style_treeitemimage=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_treeitemimage(this.currentstyle.treeitemimage=this.on_find_CurrentStyle_treeitemimage(this._pseudo));};_pGrid.on_update_style_treelinetype=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_treelinetype(this.currentstyle.treelinetype=this.on_find_CurrentStyle_treelinetype(this._pseudo));};_pGrid.on_update_style_treeopenbuttonimage=function(){if(this._is_created){this._clearAllStyleCache();}this.on_apply_style_treeopenbuttonimage(this.currentstyle.treeopenbuttonimage=this.on_find_CurrentStyle_treeopenbuttonimage(this._pseudo));};_pGrid.on_update_style_selectpointimage=function(){this.on_apply_style_selectpointimage(this.currentstyle.selectpointimage=this.on_find_CurrentStyle_selectpointimage(this._pseudo));};_pGrid.on_apply_style_font=function(_a){if(!this.enableredraw){this._enable_redraw_history["refreshall"]=true;return;}if(this._is_created){this._refreshAll();}};_pGrid.on_apply_style_color=function(_a){if(!this.enableredraw){this._enable_redraw_history["refreshall"]=true;return;}if(this._is_created){this._refreshAll();}};_pGrid.on_apply_style_align=function(_a){if(!this.enableredraw){this._enable_redraw_history["refreshall"]=true;return;}if(this._is_created){this._refreshAll();}};_pGrid.on_apply_style_linetype=function(_a){if(!this.enableredraw){this._enable_redraw_history["refreshall"]=true;return;}if(this._is_created){this._refreshAll();}};_pGrid.on_apply_style_line=function(_a){if(!this.enableredraw){this._enable_redraw_history["refreshall"]=true;return;}if(this._is_created){this._refreshAll();}};_pGrid.on_apply_style_selectline=function(_a){if(!this.enableredraw){this._enable_redraw_history["refreshall"]=true;return;}if(this._is_created){this._refreshAll();}};_pGrid.on_apply_style_selectlinetype=function(_a){if(!this.enableredraw){this._enable_redraw_history["refreshall"]=true;return;}if(this._is_created){this._refreshAll();}};_pGrid.on_apply_style_treeclosebuttonimage=function(_a){if(!this.enableredraw){this._enable_redraw_history["refreshall"]=true;return;}if(this._is_created){this._refreshAll();}};_pGrid.on_apply_style_treecollapseimage=function(_a){if(!this.enableredraw){this._enable_redraw_history["refreshall"]=true;return;}if(this._is_created){this._refreshAll();}};_pGrid.on_apply_style_treeexpandimage=function(_a){if(!this.enableredraw){this._enable_redraw_history["refreshall"]=true;return;}if(this._is_created){this._refreshAll();}};_pGrid.on_apply_style_treeitemimage=function(_a){if(!this.enableredraw){this._enable_redraw_history["refreshall"]=true;return;}if(this._is_created){this._refreshAll();}};_pGrid.on_apply_style_treelinetype=function(_a){if(!this.enableredraw){this._enable_redraw_history["refreshall"]=true;return;}if(this._is_created){this._refreshAll();}};_pGrid.on_apply_style_treeopenbuttonimage=function(_a){if(!this.enableredraw){this._enable_redraw_history["refreshall"]=true;return;}if(this._is_created){this._refreshAll();}};_pGrid.on_apply_style_selectpointimage=function(_a){if(!this.enableredraw){return;}if(!this._is_created){return;}if(this._select_ctrl){this._select_ctrl._updateAll();}};_pGrid._find_bandcomp_pseudo_obj=function(_a,_b,_c,_d){var _e;var _f=this._curFormat;if(_a=="head"){_e=this._headBand;if(!_e){_e=this._temphead;if(!_e){_e=this._temphead=new nexacro.GridBand("head",0,0,0,0,this,_f._headband);}}}else if(_a=="summ"||_a=="summary"){_e=this._summBand;if(!_e){_e=this._tempsumm;if(!_e){_e=this._tempsumm=new nexacro.GridBand("summ",0,0,0,0,this,_f._summband);}}}else{_e=this._bodyBand;}var _g=null;if(_e){if(_a=="summ"||_a=="summary"){_g=nexacro.Component.prototype._find_pseudo_obj.call(_e,_b,_c,_d);if(!_g){_e.id="summary";_g=nexacro.Component.prototype._find_pseudo_obj.call(_e,_b,_c,_d);_e.id="summ";}}else{_g=nexacro.Component.prototype._find_pseudo_obj.call(_e,_b,_c,_d);}}return _g;};_pGrid.on_create_contents=function(){var _a=this.getElement();if(_a){var _b=this._text_elem=new nexacro.TextBoxElement(_a);_b.setElementSize(this._client_width,this._client_height);_b.setElementVisible(false);_b.setElementAlignXY("center","middle");_b.setElementWordWrap("char");this._createBandsAndAreas();}};_pGrid.on_created_contents=function(){var _a=this._text_elem;if(_a){_a.create();}var _b=this._bodyBand;if(_b){_b.on_created();}var _c=this._headBand;if(_c){_c.on_created();}var _d=this._summBand;if(_d){_d.on_created();}var _e=this._select_ctrl;if(_e){_e.on_created();}if(_b||_c||_d){this._onResetScrollBar();this._applyAutofittype(true);}if(this._create_selection!=null){var _f=this._create_selection;this._resetSelect(_f.row,_f.cell,_f.col,_f.subrow,_f.pivot);}this._create_selection=null;this._is_created=true;if(this._tree_recreate==true){this._recreate_contents_all(true,true,true);this._tree_recreate=false;}else if(this._image_recreate==true){this._recreate_contents_all(true,true,true);this._image_recreate=false;}else if(this.autosizingtype!="none"){this._recreate_contents_all(true,true,true);}else{this._refreshBody();}if(nexacro._enableaccessibility&&!this._accept_focus){var _g=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_g&&_g.enable){this._accept_focus=true;}}this.on_apply_nodatatext();this.on_apply_nodataimage();if(this._control_element){this._control_element._arrangeBandOrder();}this.on_apply_prop_rtldirection();this._adjustOverlayElements(true,false);};_pGrid.on_destroy_contents=function(){if(this._binddataset){this._removeDSEventHandlers(this._binddataset);}if(this._aniframe_rowscroll){this._aniframe_rowscroll.destroy();}if(this._aniframe_colscroll){this._aniframe_colscroll.destroy();}var _a=this._text_elem;if(_a){_a.destroy();this._text_elem=null;}var _b=this._formats;if(_b){for(var _c in _b){var _d=_b[_c];if(_d&&_d.destroy){_d.destroy();_b[_c]=null;}}}this._select_ctrl=null;this._destroyBands(true);if(this._currentCellEditor){this._currentCellEditor.destroy();this._currentCellEditor=null;this._tempEditor=null;}this._clearDestroyEditor();if(this._displaycalendarctrl){delete this._displaycalendarctrl;this._displaycalendarctrl=null;}this._binddataset=null;if(this._tempEditor){this._tempEditor.destroy();this._tempEditor=null;}if(this._resizer_colctrl){this._resizer_colctrl.destroy();}if(this._resizer_rowctrl){this._resizer_rowctrl.destroy();}if(this._extratrack_timer){this._extratrack_timer._handle.stop();this._extratrack_timer._handle=null;this._extratrack_timer=null;}this._destroyOverlayElements();this._curFormat=null;this._formats=null;this._mouseovercell=null;this._prevAreaCellObj=null;this._selectstartrow=null;this._selectstartcol=null;this._selectstartsubrow=null;this._selectstartpvt=null;this._selectendrow=null;this._selectendcol=null;this._selectendsubrow=null;this._selectendpvt=null;this._resizerCols=null;this._resizerRows=null;this._imgsize_cache=null;this._rowSizeListSub=null;this._rowSizeList=null;this._rowHeadListSub=null;this._rowHeadList=null;this._rowSummListSub=null;this._rowSummList=null;this._toprowpos=null;this._selectinfo=null;this._recreate_contents_proc=null;this._keydown_elem=null;this._tree_load_all=null;this._image_load_all=null;this._focus_proc=null;this._after_recreate_contents_all=null;this._band_scroll_sizes=null;this._format_str=null;this._exprcache=null;this._is_use_bind_expr_outerstyle=null;this._is_use_bind_expr_prop=null;this._is_use_bind_expr_style=null;this._setdataobj=null;this._resizer_colctrl=null;this._resizer_rowctrl=null;this.selectstartrow=null;this.selectstartcol=null;this.selectstartsubrow=null;this.selectstartpivot=null;this.selectendrow=null;this.selectendcol=null;this.selectendsubrow=null;this.selectendpivot=null;this.formats=null;this._destroyeditors=null;this._overlay_elements=null;this._recalcXY_info=null;this._fake_mergecell_arr=null;this._enable_redraw_history=null;};_pGrid._is_changingRect=false;_pGrid.on_change_containerRect=function(_a,_b){if(this._is_changingRect){return;}this._is_changingRect=true;this._resizeBand();if(this._is_use_suppress){this._adjustOverlayElements(true,false);}this._is_changingRect=false;};_pGrid.on_create_control_element=function(_a){var _b=new nexacro.GridScrollableControlElement(_a);_b.setLinkedControl(this);this._control_element=_b;return _b;};_pGrid._on_deactivate=function(){if(!this._isSelected()){this._stat_change("notfocus","normal");}};_pGrid.on_update_position=function(_a,_b){nexacro.Component.prototype.on_update_position.call(this,_a,_b);if(this._currentCellEditor&&this._currentCellEditor._isPopupVisible()){this._currentCellEditor.on_update_position(_a,_b);}};_pGrid.applyto_bindSource=function(_a,_b){if(this._currentCellEditor){this._currentCellEditor._setDataset();}};_pGrid._getAccessibilityRole=function(_a){var _b=_a.role?_a.role:this._accessibility_role;if(this._hasTree){_b="treegrid";}return _b;};_pGrid._isAccessibilityEnable=function(){return this._accept_focus;};_pGrid.on_get_style_accessibility_label=function(){return this.id;};_pGrid.on_fire_sys_onaccessibilitygesture=function(_a,_b,_c){var _d=false;var _e=this._curFormat;if(_e){var _f=(_e._headcells)?_e._headcells.length:0;var _g=(_e._bodycells)?_e._bodycells.length:0;var _h=(_e._summcells)?_e._summcells.length:0;if(this._accessibility_cellidx<0&&this._accessibility_row<0){if(_a){this._currentBand="head";this._accessibility_row=0;this._accessibility_cellidx= -1;}else{this._currentBand="summ";this._accessibility_row=0;this._accessibility_cellidx=_h;}}var _i=null;while(true){_i=null;if(_a){this._accessibility_cellidx++ ;}else{this._accessibility_cellidx-- ;}if(this._currentBand=="head"){if(_a){if(!this._headBand||this._accessibility_cellidx>=_f){this._currentBand="body";this._accessibility_row=0;this._accessibility_cellidx=0;if(this.rowcount<=0&&this.nodatatext){this._bodyBand._setAccessibilityNotifyEvent();_d=true;break;}}}else{if(!this._headBand||this._accessibility_cellidx<0){this._accessibility_row= -1;this._accessibility_cellidx= -1;_d=false;break;}}}else if(this._currentBand=="summ"){if(_a){if(!this._summBand||this._accessibility_cellidx>=_h){this._accessibility_row= -1;this._accessibility_cellidx= -1;_d=false;break;}}else{if(!this._summBand||this._accessibility_cellidx<0){this._currentBand="body";this._accessibility_row=this._rowcount-1;this._accessibility_cellidx=_g-1;if(this.rowcount<=0&&this.nodatatext){this._bodyBand._setAccessibilityNotifyEvent();_d=true;break;}}}}else{if(_a){if(this._accessibility_cellidx>=_g){this._accessibility_row++ ;this._accessibility_cellidx=0;}if(this._rowcount<=0||this._accessibility_row>=this._rowcount){this._currentBand="summ";this._accessibility_row=0;this._accessibility_cellidx=0;}}else{if(this._accessibility_cellidx<0){this._accessibility_row-- ;this._accessibility_cellidx=_g-1;}if(this._rowcount<=0||this._accessibility_row<0){this._currentBand="head";this._accessibility_row=0;this._accessibility_cellidx=_f-1;}}}_i=this._getAccessibilityCurrentCell(this._accessibility_row,this._accessibility_cellidx);if(_i){_i._setAccessibilityNotifyEvent();_d=true;break;}}}return _d;};_pGrid._setAccessibilityNotifyEvent=function(_a){this._resetScrollPos(this,this._adjust_left,this._adjust_top,this._adjust_left+this._adjust_width,this._adjust_top+this._adjust_height,(_a&&_a>0)?0:1);this._accessibility_row= -1;this._accessibility_cellidx= -1;this.on_fire_sys_onaccessibilitygesture(_a);};_pGrid._setAccessibilityInfoByHover=function(_a){var _b=false;if(_a){if(_a._cellobj){_a=_a._cellobj;}if(_a instanceof nexacro.GridCell){this._currentBand=_a._band.id;this._accessibility_cellidx=_a._cellidx;this._accessibility_row=this._getDataRow(_a._rowidx);this._first_focus=true;}else{this._first_focus=false;}_b=_a._setAccessibilityInfoByHover();}return _b;};_pGrid.on_apply_prop_class=function(){this._clearAllStyleCache();if(this._bodyBand){this._bodyBand._css_finder=null;this._bodyBand._ref_css_finder=null;}if(this._headBand){this._headBand._css_finder=null;this._headBand._ref_css_finder=null;}if(this._summBand){this._summBand._css_finder=null;this._summBand._ref_css_finder=null;}nexacro.Component.prototype.on_apply_prop_class.call(this);if(this._is_created){this._refreshAll(true);}};_pGrid.set_fillareatype=function(_a){switch(_a){case "none":case "linerow":case "datarow":case "controlrow":case "allrow":if(_a!=this.fillareatype){this.fillareatype=_a;this.on_apply_fillareatype();}break;}};_pGrid.on_apply_fillareatype=function(){this._resetfillarea=true;this._recreate_contents_all(false,false,false,true);this._resetfillarea=false;};_pGrid.set_selectscrollmode=function(_a){switch(_a){case "select":case "scroll":this._selectscrollmode=this.selectscrollmode=_a;break;case "default":this._selectscrollmode=(nexacro.isTouchInteraction)?"scroll":"select";break;}};_pGrid.set_scrollpixel=function(_a){if(_a!=this.scrollpixel){switch(_a){case "none":case "all":this.scrollpixel=this._scrollpixel=_a;this.on_apply_scrollpixel();break;case "default":this.scrollpixel=_a;this._scrollpixel=(nexacro.isTouchInteraction)?"all":"none";this.on_apply_scrollpixel();break;}}};_pGrid.on_apply_scrollpixel=function(){this._updateScrollInfo();};_pGrid._updateScrollInfo=function(){if(this._control_element){this._control_element._updateClientSize();this._updateClientSize(this._control_element);}};_pGrid.set_hideendline=function(_a){switch(_a){case "none":case "row":case "col":case "both":if(_a!=this.hideendline){this.hideendline=_a;this.on_apply_hideendline();}break;}};_pGrid.on_apply_hideendline=function(){this._refreshAll();};_pGrid.set_userdata=function(_a){if(this.userdata!=_a){this.userdata=_a;}};_pGrid.set_nodataimage=function(_a){if(_a.substring(0,4).toLowerCase()!="url("){_a="URL("+_a+")";}this.nodataimage=_a;this.on_apply_nodataimage();};_pGrid.on_apply_nodataimage=function(){if(this.getElement()){var _a=this._bodyBand;if(_a){_a._control_pseudo="";_a._contents_pseudo="";_a._stat_change();}else{this._control_pseudo="";this._contents_pseudo="";this._stat_change();}}};_pGrid.set_nodatatext=function(_a){this.nodatatext=_a;this.on_apply_nodatatext();};_pGrid.on_apply_nodatatext=function(){var _a=this._getGridRowCount();if(this.getElement()&&_a==0){var _b=this._bodyBand;if(_b){if(this._text_elem){this._text_elem.setElementVisible(false);}_b.on_apply_text();}else{if(this._text_elem){var _c=this.nodatatext;var _d=this.on_find_CurrentStyle_font();var _e=this.on_find_CurrentStyle_color();this._text_elem.setElementVisible(true);this._text_elem.setElementText(_c);this._text_elem.setElementFont(_d);this._text_elem.setElementColor(_e);}}}else{if(this._text_elem){this._text_elem.setElementVisible(false);}}};_pGrid.set_summarytype=function(_a){switch(_a){case "default":case "top":case "left":case "lefttop":if(_a!=this.summarytype){this.summarytype=_a;this.on_apply_summarytype();}break;}};_pGrid.on_apply_summarytype=function(){if(this.getElement()&&this._curFormat!=null&&this._curFormat.summHeight>0){this._recreate();}};_pGrid.set_suppresslevel=function(_a){switch(_a){case "sameskip":case "allskip":case "allcompare":if(_a!=this.suppresslevel){this.suppresslevel=_a;this.on_apply_suppresslevel();}break;}};_pGrid.on_apply_suppresslevel=function(){if(this.getElement()&&this._curFormat!=null){this._refreshBody();}};_pGrid.set_useselcolor=function(_a){_a=nexacro._toBoolean(_a);this.useselcolor=_a;this.on_apply_useselcolor();};_pGrid.on_apply_useselcolor=function(){this._refreshBody();};_pGrid.setBindDataset=function(_a){if(_a instanceof nexacro.Dataset){if(this._binddataset){this._removeDSEventHandlers(this._binddataset);}if(!_a){this._binddataset=null;this.binddataset="";}else{this._binddataset=_a;this.binddataset=_a.id;}this.on_apply_prop_binddataset();}};_pGrid.getBindDataset=function(){return this._binddataset;};_pGrid.set_binddataset=function(_a){if(typeof _a!="string"){this.setBindDataset(_a);return;}if(_a!=this.binddataset){if(this._binddataset){this._removeDSEventHandlers(this._binddataset);}if(!_a){this._binddataset=null;this.binddataset="";}else{_a=_a.replace("@","");this._binddataset=this._findDataset(_a);this.binddataset=_a;}this.on_apply_prop_binddataset();}else if(this.binddataset&&!this._binddataset){this._setBindDatasetStr(this.binddataset);this.on_apply_prop_binddataset();}return this.binddataset;};_pGrid.on_apply_prop_binddataset=function(){var _a=this._binddataset;if(_a){this.binddataset=_a.id;this.rowcount=this._rowcount=_a.rowcount;this._rowposition=_a.rowposition;this._exprcache={};this._initTreeStates();this._clearAllStyleCache();this._recreate_contents_all(true,true,true);this._initSelect(this._rowposition);this._setDSEventHandlers(_a);}else{this.rowcount=this._rowcount=0;this._rowposition= -1;this._exprcache={};this._initTreeStates();this._clearAllStyleCache();this._recreate_contents_all(true,true,true);}};_pGrid.set_formatid=function(_a){if(this.formatid!=_a){this.formatid=_a;this.on_apply_formatid();}};_pGrid.on_apply_formatid=function(){var _a=this.formatid;if(_a==""){_a="default";}this._curFormat=this._formats[_a];this._recreate();this._resetSelect(this._rowposition);};_pGrid.set_formats=function(_a){this.formats=_a;this.on_apply_formats();};_pGrid.on_apply_formats=function(){this._setContents(this.formats);this._recreate();this._resetSelect(this._rowposition);};_pGrid.set_locale=function(_a){if(_a!=this.locale){this.locale=_a;if(this._locale!=_a){this._locale=_a;this.on_apply_locale();}}};_pGrid.on_apply_locale=function(){var _a=this._locale;if(this._headBand){this._headBand._setLocale(_a);}if(this._bodyBand){this._bodyBand._setLocale(_a);}if(this._summBand){this._summBand._setLocale(_a);}};_pGrid.set_areaselecttype=function(_a){if(this.areaselecttype!=_a){switch(_a){case "overband":case "limitband":this.areaselecttype=_a;break;}}};_pGrid.set_autoenter=function(_a){if(this.autoenter!=_a){switch(_a){case "select":case "key":case "none":this.autoenter=_a;break;}}};_pGrid.set_autofitbandtype=function(_a){if(this.autofitbandtype!=_a){switch(_a){case "body":case "allband":case "nohead":case "noleft":case "nohead,noleft":this.autofitbandtype=_a;break;}}};_pGrid.set_autofitminheight=function(_a){if(this.autofitminheight!=_a){this.autofitminheight=(isNaN(_a)?100:parseInt(_a,10));}};_pGrid.set_autofitminwidth=function(_a){if(this.autofitminwidth!=_a){this.autofitminwidth=(isNaN(_a)?100:parseInt(_a,10));}};_pGrid.set_autofittype=function(_a){if(this.autofittype!=_a){switch(_a){case "none":case "col":case "row":case "both":case "allpivot":case "allrow":case "allboth":case "col,allrow":case "row,allpivot":this.autofittype=_a;this.on_apply_prop_autofittype();break;}}};_pGrid.on_apply_prop_autofittype=function(){if(this._curFormat){this._curFormat._resetOrgColSize(true);}this._applyAutofittype(true,true);};_pGrid.set_visible=function(_a){if(_a===undefined||_a===null){return;}_a=nexacro._toBoolean(_a);if(this.visible!=_a){nexacro.Component.prototype.set_visible.call(this,_a);if(_a&&this._is_created){this._refreshAll();if(nexacro.Browser=="Chrome"&&this.vscrollbar){this._absolutelyResetScrollPos(true);var _b=this._control_element.vscroll_limit;var _c=this.vscrollbar._pos;if(_c>=_b){_c=_b;this._control_element.setElementVScrollPos(_c-1);}else{this._control_element.setElementVScrollPos(_c+1);}this._control_element.setElementVScrollPos(_c);this._absolutelyResetScrollPos(false);}}}};_pGrid.set_autosizebandtype=function(_a){if(this.autosizebandtype!=_a){switch(_a){case "body":this._bodyAutoSize=true;this._headAutoSize=false;this._summAutoSize=false;this._AutoSizeLcol=false;this._AutoSizeRcol=false;break;case "head":this._bodyAutoSize=false;this._headAutoSize=true;this._summAutoSize=false;this._AutoSizeLcol=false;this._AutoSizeRcol=false;break;case "summary":this._bodyAutoSize=false;this._headAutoSize=false;this._summAutoSize=true;this._AutoSizeLcol=false;this._AutoSizeRcol=false;break;case "allband":this._bodyAutoSize=true;this._headAutoSize=true;this._summAutoSize=true;this._AutoSizeLcol=true;this._AutoSizeRcol=true;break;case "nohead":this._bodyAutoSize=true;this._headAutoSize=false;this._summAutoSize=true;this._AutoSizeLcol=false;this._AutoSizeRcol=false;break;case "noleft":this._bodyAutoSize=true;this._headAutoSize=true;this._summAutoSize=true;this._AutoSizeLcol=false;this._AutoSizeRcol=true;break;case "nohead,noleft":this._bodyAutoSize=true;this._headAutoSize=false;this._summAutoSize=true;this._AutoSizeLcol=false;this._AutoSizeRcol=true;break;}this.autosizebandtype=_a;this.on_apply_autosizebandtype();}};_pGrid.on_apply_autosizebandtype=function(){if(this.getElement()){this._recreate_contents_all(true,true,true);}};_pGrid.set_autosizingtype=function(_a){if(this.autosizingtype!=_a){var _b=false;if(this.extendsizetype=="row"||this.extendsizetype=="both"){_b=true;}switch(_a){case "none":case "col":this._rowSizeEx=_b;break;case "row":case "both":this._rowSizeEx=true;break;}if(_a=="row"||_a=="none"||!_a){if(this._curFormat){this._curFormat._resetOrgColSize(true);}}this.autosizingtype=_a;}this.on_apply_autosizingtype();};_pGrid.on_apply_autosizingtype=function(){if(this.getElement()){this._isUserChangeHeadRowSize=false;this._isUserChangeBodyRowSize=false;this._isUserChangeSummRowSize=false;this._recreate_contents_all(true,true,true);}};_pGrid.set_readonly=function(_a){_a=nexacro._toBoolean(_a);if(_a!=this.readonly){this.readonly=_a;this.on_apply_readonly();}};_pGrid.on_apply_readonly=function(_a){var _b=this.readonly;if(_b){this._stat_change("readonly",this._pseudo);}else{this._stat_change("writable",this._pseudo=="readonly"?"normal":this._pseudo);}};_pGrid.set_selectbandtype=function(_a){if(this.selectbandtype!=_a){switch(_a){case "default":case "allband":case "body":case "nohead":case "noleft":this.selectbandtype=_a;this.on_apply_selectbandtype();break;}}};_pGrid.on_apply_selectbandtype=function(){};_pGrid.set_selectchangetype=function(_a){if(this.selectchangetype!=_a){switch(_a){case "up":case "down":this.selectchangetype=_a;break;}}};_pGrid.set_selecttype=function(_a){if(this.selecttype!=_a){switch(_a){case "row":case "cell":case "area":case "multirow":case "multicell":case "multiarea":case "treecell":case "multitreecell":this.selecttype=_a;this.on_apply_selecttype();break;default:if(this.selecttype!="row"){this.selecttype="row";this.on_apply_selecttype();}break;}}};_pGrid.on_apply_selecttype=function(){this._resetSelect();this._refreshBody();this._updateSelector();};_pGrid._applySelectorScroll=function(_a,_b){var _c,_d,_e;var _f=this._curFormat;var _g=false;var _h=this._toprowpos[0];var _i=this._selectinfo.area.length>1&&this.selecttype=="multirow";if(_a[0]=="leftover0"){this._multiselect=_i?"ctrl":"shift";this._moveToCell("prev",false,true,_b,null);_g=true;}else if(_a[0]=="rightover0"){this._multiselect=_i?"ctrl":"shift";this._moveToCell("next",false,true,_b,this._selectinfo.ctrlpoint.col);_g=true;}else if(_a[0]=="leftover1"){this._multiselect=_i?"ctrl":"shift";this._moveToCell("prev",false,true,_b,this._selectinfo.ctrlpoint.col);_g=true;}else if(_a[0]=="rightover1"){this._multiselect=_i?"ctrl":"shift";this._moveToCell("next",false,true,_b,null);_g=true;}if(_a[1]=="topover0"){_d=this._selectinfo.currow-1;_c=this._begrowpos;if(_h!=_d){_e=this._jumpCurrentRow(_d);}_g=(_c!=_e);}else if(_a[1]=="bottomover0"){_d=this._selectinfo.currow+1;_c=this._begrowpos;_e=this._jumpCurrentRow(_d);_g=(_c!=_e);}else if(_a[1]=="topover1"){_d=this._selectinfo.currow-1;_c=this._begrowpos;if(_h!=_d){_e=this._jumpCurrentRow(_d);}_g=(_c!=_e);}else if(_a[1]=="bottomover1"){_d=this._selectinfo.currow+1;_c=this._begrowpos;_e=this._jumpCurrentRow(_d);_g=(_c!=_e);}return _g;};_pGrid._startAreaSizing=function(_a,_b){var _c=this._curFormat;var _d=_c._bodyrows.length;var _e=this._getAreaInfoWithPos(_a,_b);var _f=this._selectinfo.area;if(_b==0){var _g=_c._bodycells[_e.ecell];if(_g){this._selectinfo.ctrlpoint._set(_g,_e.erow,_d);}}else if(_b==1){var _g=_c._bodycells[_e.scell];if(_g){this._selectinfo.ctrlpoint._set(_g,_e.srow,_d);}}else if(_b==2){var _g=_c._bodycells[_e.ecell];if(_g){this._selectinfo.ctrlpoint._set(_g,_e.srow,_d);}}else if(_b==3){var _g=_c._bodycells[_e.scell];if(_g){this._selectinfo.ctrlpoint._set(_g,_e.erow,_d);}}};_pGrid._applyAreaSizing=function(_a,_b,_c){var _d=this._curFormat;var _e=_d._bodyrows.length;var _f=this._selectinfo.curcell;var _g=this._selectinfo.curcol;var _h=this._selectinfo.curdsrow;var _i=this._selectinfo.cursubrow;var _j=this._selectinfo.curpvt;var _k,_l,_m,_n,_o=this._selectinfo.curpvt;var _p=this._getAreaInfoWithPos(_a,_b);if(_b==0){this._setSelectedInfo(_p.scell,_p.scol,_p.srow,_p.ssubrow,null,_p);_k=_p.scell;_l=_p.scol;_m=_p.srow;_n=_p.ssubrow;}else if(_b==1){this._setSelectedInfo(_p.ecell,_p.ecol,_p.erow,_p.esubrow,null,_p);_k=_p.ecell;_l=_p.ecol;_m=_p.erow;_n=_p.esubrow;}else if(_b==2){this._setSelectedInfo(_p.scell,_p.scol,_p.erow,_p.esubrow,null,_p);_k=_p.scell;_l=_p.scol;_m=_p.erow;_n=_p.esubrow;}else if(_b==3){this._setSelectedInfo(_p.ecell,_p.ecol,_p.erow,_p.esubrow,null,_p);_k=_p.ecell;_l=_p.ecol;_m=_p.srow;_n=_p.ssubrow;}var _q;if(_c){_q="selectorsizing";}else if(_c===false){_q="selector";}if(this._selectinfo.area.length>1&&this.selecttype=="multirow"){this._multiselect="ctrl";}else{this._multiselect="shift";}retn=this._ChangeSelect(_k,_l,_m,_n,_o,false,_f,_g,_h,_i,_j,"body",_q);};_pGrid._getAreaInfoWithPos=function(_a,_b){var _c=this._getScrollLeft();var _d=this._getScrollTop();var _e=this._getScollMaxLeft();var _f=this._select_ctrl;var _g=_a.l;var _h=_g+_a.w;var _i=_a.t;var _j=_i+_a.h;var _k=this._curFormat;var _l=_k._cols;var _m=_k._bodyrows;var _n=this._getGridRowCount();var _o,_p,_q,_r,_s,_t,_u,_v,_w,_x,_y;var _z,_aa,_ab,_ac;var _ad;var _ae;var _af=this._selectinfo.ctrlpoint;var _ag,_ah;if(_f){_ag=_f._start_begarea;_ah=_f._start_endarea;}else{_ag=this._selectinfo.arearect.barea;_ah=this._selectinfo.arearect.earea;}var _ai=parseInt(this._fixed_rowcnt);var _aj=_ai>0?parseInt(this._fixed_startrow):0;var _ak=parseInt(this._fixed_endrow);var _al=parseInt(this._fixed_height);if(_ai>0){_ae=this._getHeadHeight();}else{_ae=this._getHeadHeight()-_d;}if(this.summarytype=="top"||this.summarytype=="lefttop"){_ae+=this._getSummHeight();}var _am,_an;var _ao=_k._bodycells;var _ap=_ao.length;var _aq,_o,_ar,_as,_at;var _au;var _av;_p= -1;_am=_ae;for(var _aw=_aj;_aw<_n;_aw++ ){if(_ai>0&&_aw==(_ak+1)){_am-=_d;}_an=_am+this._getRowSize(_aw);if(this._track_mode=="areaselect"){_au=(_i<_an);if(_aw==0&&_i<_am){_au=true;}}else{_au=(_am<=_i&&_i<_an);}if(_p<0&&_au){_p=this._getDataRow(_aw);for(var _ax=0;_ax<_ap;_ax++ ){_at=_ao[_ax]._area;_aq=_ao[_ax]._col;_o=_ao[_ax]._row;_ar=_ao[_ax]._colspan;_as=_ao[_ax]._rowspan;if(_ao[_ax]._area=="left"){_ad=this._client_left;}else if(_ao[_ax]._area=="right"){_ad=this._client_width-_k.rightWidth;}else{_ad=_k.leftWidth-_c;}_z=_ad+_l[_aq].left;_ab=_ad+_l[_aq+_ar-1].right;_aa=_am+_m[_o].top;_ac=_am+_m[_o+_as-1].bottom;_av=this._getSubCellRect(_aw,_ax, -1, -1,false);_z=_av.left;_aa=_av.top;_ab=_av.right;_ac=_av.bottom;if(_ai>0&&_aw<=_ak){_aa+=_d;_ac+=_d;}if(this._track_mode=="areaselect"){_au=(_z<=_g&&_g<_ab&&_i<_ac);if(_ax==0&&_g<_z){_au=true;}}else{_au=(_z<=_g&&_g<_ab&&_i<_ac);}if(_au){if(_ah!=_ag||(_ag=="body"&&_ah=="body")){if(_ag!="left"&&_c>0&&_at=="left"){continue;}if(_ag!="right"&&_c<_e&&_at=="right"){continue;}if(_ah!="right"&&_at=="right"){continue;}}_r=_ax;_t=_aq;_v=_o;if(_a.area!="right"){break;}else if(_ao[_ax]._area=="right"){break;}}}}if(this._track_mode=="areaselect"){_au=_j<_an;if((_aw+1)==_n&&_j>=_an){_au=true;}}else{_au=_am<_j&&_j<=_an;}if(_p>=0&&_au){_q=this._getDataRow(_aw);for(var _ax=0;_ax<_ap;_ax++ ){_aq=_ao[_ax]._col;_o=_ao[_ax]._row;_ar=_ao[_ax]._colspan;_as=_ao[_ax]._rowspan;if(_ao[_ax]._area=="left"){_ad=0;}else if(_ao[_ax]._area=="right"){_ad=this._client_width-_k.rightWidth;}else{_ad=0;}_av=this._getSubCellRect(_aw,_ax, -1, -1,false);_aa=_av.top;_ac=_av.bottom;if(_ai>0&&_aw<=_ak){_aa+=_d;_ac+=_d;}if(_ao[_ax]._area=="right"){_z=_av.left-_c;_ab=_av.right-_c;}else{_z=_av.left;_ab=_av.right;}if(this._track_mode=="areaselect"){_au=_z<_h&&_h<=_ab;if((_ax+1)==_ap&&_h>=_ab){_au=true;}}else{_au=_z<_h&&_h<=_ab&&_aa<_j;}if(_au){if(_ah!=_ag||(_ag=="body"&&_ah=="body")){if(_ah!="right"&&_c<_e&&_ao[_ax]._area=="right"){continue;}if(_ah!="left"&&_c>0&&_ao[_ax]._area=="left"){continue;}if(_ag!="left"&&_ao[_ax]._area=="left"){continue;}}_s=_ax;_u=_aq;_w=_o;if(_a.area!="right"){break;}else if(_ao[_ax]._area=="right"){break;}}}break;}_am=_an;}_x=epvt=this._selectinfo.curpvt;return {srow:_p,erow:_q,scell:_r,ecell:_s,scol:_t,ecol:_u,ssubrow:_v,esubrow:_w,spvt:_x,epvt:epvt};};_pGrid._getSelectRect=function(_a,_b){var _c=this._selectinfo.arearect;var _d=this._selectinfo.area;_c.left=0;_c.top=0;_c.width=0;_c.height=0;_c.barea="";_c.earea="";var _e=this._getScrollLeft();var _f=this._getScrollTop();while(_d.length){var _g=_d[_d.length-1];var _h=this._curFormat;var _i=_h._cols;var _j=_h._bodyrows;var _k=this._rowSizeListSub;var _l=_g.begcol;var _m=_g.endcol;var _n=_h.leftWidth;var _o=this._client_width-_h.rightWidth;var _p=this._fixed_startrow;var _q=this._fixed_endrow;if(_g.begrow<0){break;}if(!this._isAreaSelect()){_l=0;_m=_i.length-1;}if(_l>=0&&_m>=0){if(_a&&_i[_l]._area!=_i[_m]._area){break;}_c.barea=_i[_l]._area;_c.earea=_i[_m]._area;if(_c.barea=="right"){_c.left=_o+_i[_l].left;_c.width=_i[_m].right-_i[_l].left;}else{if(_c.barea=="left"){_c.left=_i[_l].left;}else{_c.left=_n+_i[_l].left-_e;}if(_c.earea=="left"){_c.width=_i[_m].right-_c.left;}else if(_c.earea=="body"){_c.width=(_n+_i[_m].right-_e)-_c.left;}else{_c.width=(_o+_i[_m].right)-_c.left;}}}else{_c.left=this._client_left;_c.width=this._client_width;}for(var _r=0;_r<=_g.endrow;_r++ ){var _s=0,_t=_j.length-1;if(this._hasTree){if(this._getGridRow(_r)< -2){continue;}}if(_r<_g.begrow){if(_b&&_r<_p){continue;}for(var _u=_s;_u<=_t;_u++ ){_c.top+=_k[_r*_j.length+_u];}}else{if(_r==_g.begrow){_s=_g.begsubrow[0];}if(_r==_g.endrow){_t=_g.endsubrow[_r-_g.begrow];}for(var _u=0;_u<=_t;_u++ ){if(_u<_s){_c.top+=_k[_r*_j.length+_u];}else{_c.height+=_k[_r*_j.length+_u];}}}}_c.top+=this._bodyBand._adjust_top-_f;break;}this._selectinfo.arearect=_c;return _c;};_pGrid._updateSelector=function(_a,_b){var _c=this._isAreaSelect()&&nexacro.isTouchInteraction;if(this._control_element){var _d,_e,_f,_g,_h;var _i=this._select_ctrl;if(_c){if(!_i){_i=new nexacro.GridSelector("gridselector","absolute",0,0,0,0,null,null,this);_i._setCallbackFn(this._startAreaSizing,this._applyAreaSizing,this._applySelectorScroll);_i.createComponent();_i._createButton();this._select_ctrl=_i;}if((_a=="vscroll"||_a=="hscroll")&&!_i._is_tracking){_d=this._selectinfo.arearect;if(_a=="hscroll"){if(_d.barea=="left"){if(_d.earea=="body"){_d.width-=_b;}}else if(_d.barea=="body"){_d.left-=_b;if(_d.earea=="right"){_d.width+=_b;}}}if(_a=="vscroll"){_d.top-=_b;}_e=_d.left;_f=_d.top;_g=_d.width;_h=_d.height;if(_f+_h<=this._bodyBand._adjust_top){_c=false;}}else{_d=this._getSelectRect(_i._onlyarea,true);_e=_d.left;_f=_d.top;_g=_d.width;_h=_d.height;}if(!_e&&!_f&&!_g&&!_h){_c=false;}_i.move(_e,_f,_g,_h,_a);if(_c){if(!_i._is_tracking){_i.set_visible(false);}}else{_i.set_visible(false);}}}else{if(this._select_ctrl){this._select_ctrl.destroy();this._select_ctrl=null;}}};_pGrid.set_autoupdatetype=function(_a){if(this.autoupdatetype!=_a){switch(_a){case "none":case "comboselect":case "dateselect":case "itemselect":this.autoupdatetype=_a;break;}}};_pGrid.set_cellclickbound=function(_a){if(this.cellclickbound!=_a){switch(_a){case "control":case "cell":this.cellclickbound=_a;break;}}};_pGrid.set_cellmovingtype=function(_a){if(this.cellmovingtype!=_a){switch(_a){case "none":case "col":case "col,band":case "col,merge":case "col,line":this.cellmovingtype=_a;break;}}};_pGrid.set_cellsizebandtype=function(_a){if(this.cellsizebandtype!=_a){switch(_a){case "body":case "allband":case "nohead":case "noleft":case "nohead,noleft":this.cellsizebandtype=_a;this.on_apply_cellsizebandtype();break;}}};_pGrid.on_apply_cellsizebandtype=function(){};_pGrid.set_cellsizingtype=function(_a){if(this.cellsizingtype!=_a){switch(_a){case "none":case "col":case "row":case "both":this.cellsizingtype=_a;this.on_apply_cellsizingtype();break;}}};_pGrid.on_apply_cellsizingtype=function(){this._applyResizer();};_pGrid.set_extendsizetype=function(_a){if(this.extendsizetype!=_a){var _b=false;if(this.autosizingtype=="row"||this.autosizingtype=="both"){_b=true;}switch(_a){case "none":case "col":this._rowSizeEx=_b;break;case "row":case "both":this._rowSizeEx=true;break;}this.extendsizetype=_a;this.on_apply_extendsizetype();}};_pGrid.on_apply_extendsizetype=function(){if(this.getElement()){this._recreate_contents_all(true,true,true);}};_pGrid.set_wheelscrollrow=function(_a){if(this.wheelscrollrow!=_a){this.wheelscrollrow=(isNaN(_a)?3:parseInt(_a,10));}};_pGrid.set_usecontrolkey=function(_a){if(this.usecontrolkey!=_a){this.usecontrolkey=_a;}};_pGrid.set_treeusebutton=function(_a){if(this.treeusebutton!=_a){switch(_a){case "use":case "no":case "noclick":this.treeusebutton=_a;break;}this.on_apply_treeusebutton();}};_pGrid.set_dragscrolltype=function(_a){nexacro.Form.prototype.set_dragscrolltype.call(this,_a);};_pGrid.on_apply_treeusebutton=function(){this._refreshBody();};_pGrid.set_treeuseline=function(_a){_a=nexacro._toBoolean(_a);if(this.treeuseline!=_a){this.treeuseline=_a;this.on_apply_treeuseline();}};_pGrid.on_apply_treeuseline=function(){this._refreshBody();};_pGrid.set_treeusecheckbox=function(_a){_a=nexacro._toBoolean(_a);if(this.treeusecheckbox!=_a){this.treeusecheckbox=_a;this.on_apply_treeusecheckbox();}};_pGrid.on_apply_treeusecheckbox=function(){this._refreshBody();};_pGrid.set_treeuseimage=function(_a){_a=nexacro._toBoolean(_a);if(this.treeuseimage!=_a){this.treeuseimage=_a;this.on_apply_treeuseimage();}};_pGrid.on_apply_treeuseimage=function(){this._refreshBody();};_pGrid.set_treeuseexpandkey=function(_a){if(this.treeuseexpandkey!=_a){this.treeuseexpandkey=_a;}};_pGrid.set_treeinitstatus=function(_a){this.treeinitstatus=_a;var _b,_c;switch(_a){case "collapse,null":_b=false,_c=false;break;case "expand,null":_b=true,_c=false;break;case "collapse,all":_b=false,_c=true;break;case "expand,all":_b=true,_c=true;break;}this.on_apply_treeinitstatus(_b,_c);};_pGrid.on_apply_treeinitstatus=function(_a,_b){if(!this._hasTree){return;}var _c=this._curFormat;var _d=_c._bodycells;var _e=_d.length;var _f=this._treeIndexes;var _g=this._treeStates;if(!_b){var _h=false;var _i;for(var _j=_f.length-1;_j>=0;_j-- ){var _k,_l;_i=this.getDatasetRow(_j);for(var _m=0;_m<_e;_m++ ){_k=_d[_m];_l=_k._getEdittype(_i);if(_l=="tree"){break;}}if(_k){var _n;if(_k.treestate._bindtype!=0){_n=_k._getAttrValue(_k.treestate,_i);}if(!_n||_n==""){if(_a){if(this._setTreeState(_j,1,false,"null")>0){_j=_f.length;_h=true;}}else{if(this._setTreeState(_j,0,false,"null")>0){_j=_f.length;_h=true;}}}else{var _o=this._setTreeState(_j,_n,false,"null_value");if(_o==2){_j=_f.length;_h=true;}else if(_o==1){_h=true;}}}}if(_h==true){this._recreate_contents_all(false,false,false,true);}}else{var _h=false;for(var _j=_f.length-1;_j>=0;_j-- ){if(_a){if(this._setTreeState(_j,1,false,"all")>0){_j=_f.length;_h=true;}}else{if(this._setTreeState(_j,0,false,"all")>0){_j=_f.length;_h=true;}}}if(!_a){for(var _j=_g.length-1;_j>=0;_j-- ){var _n=this._getOrgTreeStates(_j);if(_n==2){_g[_j]=2;}}}if(_h==true){this._recreate_contents_all(false,false,false,true);}}};_pGrid.set_treepathdelimiter=function(_a){if(this.treepathdelimiter!=_a){this.treepathdelimiter=_a;}};_pGrid.set_useinputpanel=function(_a){if(this.useinputpanel!=_a){this.useinputpanel=_a;}};_pGrid.on_apply_prop_enable=function(_a){if(!_a){this._enable=_a;}nexacro.Component.prototype.on_apply_prop_enable.call(this,_a);if(this._is_created){this._refreshAll();}};_pGrid.on_apply_prop_rtldirection=function(){nexacro.Component.prototype.on_apply_prop_rtldirection.call(this);var _a=this._rtldirection;if(this._headBand){this._headBand._setRtlDirection(_a);}if(this._bodyBand){this._bodyBand._setRtlDirection(_a);}if(this._summBand){this._summBand._setRtlDirection(_a);}};_pGrid.createFormat=function(){var _a=0;var _b=this._binddataset;var _c=0;var _d=0;var _e=0;var _f=0;if(_b){_d=_b.getColCount();}var _g;if(_d>0){_g="\n";_g+="\n";_g+="\n";{for(_c=0;_c<_d;_c++ ){_g+="\n";}}_g+="\n";_g+="\n";{_g+="\n";_g+="\n";}_g+="\n";_g+="\n";{for(_c=0;_c<_d;_c++ ){_g+="\n";}}_g+="\n";_g+="\n";{for(_c=0;_c<_d;_c++ ){_g+="\n";}}_g+="\n";_g+="\n";_g+="\n";}else{_g="\n";_g+="\n";_g+="\n";_g+="\n";}this.set_formats(_g);return 0;};_pGrid.setFormat=function(_a){var _b=this._formats[_a];if(_b){if(_b!=this._curFormat){this.set_formatid(_a);return true;}}else{this.formatid="";this._curFormat=null;this._destroyBands();}return false;};_pGrid.getFormatString=function(){return this.formats;};_pGrid.getCurFormatString=function(_a){if(this._curFormat){if(_a){return this._curFormat._getOrgFormatStr();}else{return this._curFormat._getFormatStr();}}else{return this.formats;}};_pGrid.getCellPos=function(){return this._selectinfo.curcell;};_pGrid.setCellPos=function(_a){return this._moveToPosCell(this._selectinfo.curdsrow,_a);};_pGrid.getCellCount=function(_a){if(!this._curFormat){return 0;}_a=_a.toLowerCase();var _b;if(_a=="head"){_b=this._curFormat._headcells;}else if(_a=="summ"||_a=="summary"){_b=this._curFormat._summcells;}else{_b=this._curFormat._bodycells;}if(_b){return _b.length;}return 0;};_pGrid.getCellRect=function(_a,_b,_c){return this.getSubCellRect(_a,_b, -1,_c);};_pGrid.getSubCellRect=function(_a,_b,_c,_d){return this._getSubCellRect(_a,_b,_c,_d,true);};_pGrid._getSubCellRect=function(_a,_b,_c,_d,_e){var _f={"left":0,"top":0,"right":0,"bottom":0,"width":0,"height":0};_f.left=0;_f.top=0;_f.right=0;_f.bottom=0;_f.width=0;_f.height=0;if(_a>=0&&_a=0){_g=_h;_h=_h._subcells[_c];}if(_h){var _i=0;var _j=0;var _k=0;var _l=this._getHeadHeight();var _m=this._curFormat._cols;if(this.summarytype=="top"||this.summarytype=="lefttop"){_l+=this._getSummHeight();}var _n=this._curFormat._bodyrows;var _o=_n.length;var _p=this._getGridRowCount();var _q=(_g)?_g._row+_h._row:_h._row;var _r=(_g)?_g._col+_h._col:_h._col;var _s=_h._rowspan;var _t=_h._colspan;var _u=this._rowSizeListSub;var _v;for(var _w=0;_w<_p;_w++ ){_v=_w;if(this._hasTree){_v=this._treeIndexes[_v];}var _x=_v*_o;if(_v==_a){for(var _y=0;_y<_q;_y++ ){_l+=_u[_x++ ];}_i=_l;for(var _z=0;_z<_s;_z++ ){_l+=_u[_x++ ];}break;}else{for(var _z=0;_z<_o;_z++ ){_l+=_u[_x+_z];}}}var _aa=0;for(var _w=0;_w<_r;_w++ ){_aa+=_m[_w].size;}_j=_aa;_aa=0;for(var _w=0;_w<_r+_t;_w++ ){_aa+=_m[_w].size;}_k=_aa;if(_h._area=="body"||_h._area==""){_j-=this._getScrollLeft();_k-=this._getScrollLeft();}_i-=this._getScrollTop();_l-=this._getScrollTop();if(_e){if(_j<0){_j=0;}if(_k<0){_k=0;}if(_i<0){_i=0;}if(_l<0){_l=0;}}_f.left=_j;_f.right=_k;_f.top=_i;_f.bottom=_l;_f.width=_k-_j;_f.height=_l-_i;}}}else if(_a== -1){if(this._curFormat&&this._curFormat._headcells){var _h=this._curFormat._headcells[_b];if(_h&&_c>=0){_h=_h._subcells[_c];}if(_h){var _i=0;var _j=0;var _k=0;var _l=0;var _m=this._curFormat._cols;var _ab=this._curFormat._headrows;var _o=_ab.length;var _q=_h._row;var _r=_h._col;var _s=_h._rowspan;var _t=_h._colspan;for(var _y=0;_y<_q;_y++ ){_l+=_ab[_y].size;}_i=_l;for(_y=0;_y<_s;_y++ ){_l+=_ab[_y+_q].size;}var _aa=0;for(var _w=0;_w<_r;_w++ ){_aa+=_m[_w].size;}_j=_aa;_aa=0;for(var _w=0;_w<_r+_t;_w++ ){_aa+=_m[_w].size;}_k=_aa;if(_h._area=="body"||_h._area==""){_j-=this._getScrollLeft();_k-=this._getScrollLeft();}if(_e){if(_j<0){_j=0;}if(_k<0){_k=0;}}_f.left=_j;_f.right=_k;_f.top=_i;_f.bottom=_l;_f.width=_k-_j;_f.height=_l-_i;}}}else if(_a== -2){if(this._curFormat&&this._curFormat._summcells){var _h=this._curFormat._summcells[_b];if(_h&&_c>=0){_h=_h._subcells[_c];}if(_h){var _i=0;var _j=0;var _k=0;var _l=0;var _m=this._curFormat._cols;if(this.summarytype=="top"||this.summarytype=="lefttop"){_l+=this._getHeadHeight();}else{_l=this._client_top+this._client_height-this._getSummHeight();}var _ac=this._curFormat._summrows;var _o=_ac.length;var _q=_h._row;var _r=_h._col;var _s=_h._rowspan;var _t=_h._colspan;for(var _y=0;_y<_q;_y++ ){_l+=_ac[_y].size;}_i=_l;for(_y=0;_y<_s;_y++ ){_l+=_ac[_y+_q].size;}var _aa=0;for(var _w=0;_w<_r;_w++ ){_aa+=_m[_w].size;}_j=_aa;_aa=0;for(var _w=0;_w<_r+_t;_w++ ){_aa+=_m[_w].size;}_k=_aa;if(_h._area=="body"||_h._area==""){_j-=this._getScrollLeft();_k-=this._getScrollLeft();}if(_e){if(_j<0){_j=0;}if(_k<0){_k=0;}}_f.left=_j;_f.right=_k;_f.top=_i;_f.bottom=_l;_f.width=_k-_j;_f.height=_l-_i;}}}return _f;};_pGrid.getCellText=function(_a,_b,_c){if(_a>=0){if(this._curFormat&&this._curFormat._bodycells){var _d=this._curFormat._bodycells[_b];if(_d){if(this._hasTree){if(_a=0){if(this._curFormat&&this._curFormat._bodycells){var _d=this._curFormat._bodycells[_b];if(_d){if(this._hasTree){if(_a_b&&_b>=0){var _e=_d[_b];return _e._subcells.length;}}return 0;};_pGrid.getSubCellProperty=function(_a,_b,_c,_d){var _e=this._curFormat;if(!_e){return undefined;}return _e.getSubCellProperty(_a,_b,_c,_d);};_pGrid.getSubCellText=function(_a,_b,_c,_d){if(_a>=0){if(this._curFormat&&this._curFormat._bodycells){if(_b>=0&&_b=0&&_c<_e._subcells.length){if(this._hasTree){if(_a=0&&_c<_e._subcells.length){return _e._subcells[_c]._getDisplayText(this._currentDSrow);}}}else if(_a== -2){if(this._curFormat&&this._curFormat._summcells){var _e=this._curFormat._summcells[_b];if(_e&&_c>=0&&_c<_e._subcells.length){return _e._subcells[_c]._getDisplayText(this._currentDSrow);}}}};_pGrid.getSubCellValue=function(_a,_b,_c,_d){if(_a>=0){if(this._curFormat&&this._curFormat._bodycells){if(_b>=0&&_b=0&&_c<_e._subcells.length){if(this._hasTree){if(_a=0&&_c<_e._subcells.length){return _e._subcells[_c]._getValue(this._currentDSrow);}}}else if(_a== -2){if(this._curFormat&&this._curFormat._summcells){var _e=this._curFormat._summcells[_b];if(_e&&_c>=0&&_c<_e._subcells.length){return _e._subcells[_c]._getValue(this._currentDSrow);}}}};_pGrid.setSubCellProperty=function(_a,_b,_c,_d,_e){var _f=this._curFormat;if(!_f){return false;}var _g=_f.setSubCellProperty(_a,_b,_c,_d,_e);if(_g){_f._clearCellStyleCache(_a,_b);this._refreshCell(_a,_b, -1,true);}return (_g!=null);};_pGrid.setFormatColProperty=function(_a,_b,_c){if(_b&&this._curFormat){_b=_b.toLowerCase();if(this._curFormat.setFormatColProperty(_a,_b,_c)){if(_b=="band"){this._recreate();}else if(_b=="size"){if(this.enableredraw){this._updateColSize(_a);}else{if(!this._enable_redraw_history["updatecolsize"]){this._enable_redraw_history["updatecolsize"]=[];}this._enable_redraw_history["updatecolsize"].push(_a);}}else{this._recreate_contents_all(true,false,false);}return true;}}return false;};_pGrid.setFormatRowProperty=function(_a,_b,_c){if(_b&&this._curFormat){_b=_b.toLowerCase();if(this._curFormat.setFormatRowProperty(_a,_b,_c)){if(_b=="band"||_b=="size"){this._isUserChangeHeadRowSize=false;this._isUserChangeSummRowSize=false;this._isUserChangeBodyRowSize=false;this._recreate();}else{this._recreate_contents_all(false,false,false);}return true;}}return false;};_pGrid.getFormatColProperty=function(_a,_b){if(this._curFormat){return this._curFormat.getFormatColProperty(_a,_b);}return null;};_pGrid.getFormatRowProperty=function(_a,_b){if(this._curFormat){return this._curFormat.getFormatRowProperty(_a,_b);}return null;};_pGrid.getFormatColCount=function(){if(this._curFormat){return this._curFormat._cols.length;}return 0;};_pGrid.getFormatRowCount=function(){if(this._curFormat){var _a=this._curFormat;var _b=0;if(_a._headrows){_b+=_a._headrows.length;}if(_a._bodyrows){_b+=_a._bodyrows.length;}if(_a._summrows){_b+=_a._summrows.length;}return _b;}return 0;};_pGrid.getFormatColSize=function(_a){if(this._curFormat){if(this._curFormat._cols.length>0&&this._curFormat._cols.length>_a){var _b=this._curFormat._cols[_a];if(_b){return _b.orgsize;}}}return -1;};_pGrid.getFormatRowSize=function(_a){if(this._curFormat){if(_a<0){return -1;}var _b=0;var _c=this._curFormat._headrows;if(_c){if(_c.length>_a){var _d=_c[_a];return _d.orgsize;}_b+=_c.length;}if(this.summarytype=="top"||this.summarytype=="lefttop"){_c=this._curFormat._summrows;if(_c){if(_c.length+_b>_a){var _d=_c[_a-_b];return _d.orgsize;}_b+=_c.length;}_c=this._curFormat._bodyrows;if(_c){if(_c.length+_b>_a){var _d=_c[_a-_b];return _d.orgsize;}}}else{_c=this._curFormat._bodyrows;if(_c){if(_c.length+_b>_a){var _d=_c[_a-_b];return _d.orgsize;}_b+=_c.length;}_c=this._curFormat._summrows;if(_c){if(_c.length+_b>_a){var _d=_c[_a-_b];return _d.orgsize;}}}}return -1;};_pGrid._isUserChangeHeadRowSize=false;_pGrid._isUserChangeBodyRowSize=false;_pGrid._isUserChangeSummRowSize=false;_pGrid._isUserChangeColSize=false;_pGrid.setRealColSize=function(_a,_b,_c,_d){if(arguments.length==3){_d=_c;_c=_b;_b=_a;_a= -9;}else if(arguments.length==2){_c=_b;_b=_a;_a= -9;_d=true;}this._isUserChangeColSize=true;return this._setColSize(_a,_b,_c,_d,true);};_pGrid.setRealRowSize=function(_a,_b,_c,_d){var _e=this._curFormat;if(_d==undefined){_d=true;}if(_c==undefined){_c=_b;_b= -1;}var _f="none";if(_d){if(_a>=0){_f="body";}else if(_a== -1){_f="head";}else if(_a== -2){_f="summ";}}else{if(_e._headrows){if(_a<_e._headrows.length){_f="head";}else{_a-=_e._headrows.length;}}if(_f=="none"){if(this.summarytype=="top"||this.summarytype=="lefttop"){if(_e._summrows){if(_a<_e._summrows.length){_f="summ";}else{_a-=_e._headrows.length;}}if(_f=="none"){_f="body";}}else{if(_e._bodyrows){var _h=(this._hasTree)?this._treeIndexes.length:this._rowcount;if(_a<_h){_f="body";}else{_a-=_h;}}if(_f=="none"){if(_e._summrows){if(_a<_e._summrows.length){_f="summ";}}}}}}var _g=false;if(_f=="body"){if(_e&&_e._bodyrows){var _i=_a;if(this._hasTree){if(_i>=this._treeIndexes.length){return false;}_i=this._treeIndexes[_i];}else{if(_i>=this._rowcount){return false;}}var _j=_e._bodyrows;var _k=_j.length;var _l=this._rowSizeList;var _m=this._rowSizeListSub;if(_b>=0){if(_b<_k){this._is_variable_bodyrowsize=true;var _n=(_i*_k)+_b;var _o=_m[_n];var _p=_c;if(_o!=_p){_m[_n]=_p;_l[_i]+=(_p-_o);_g=true;this._updateRowSizeExtendEx(_e._bodyrows,_l,_m,_i,true);if(this.enableredraw){if(this.extendsizetype!="row"&&this.extendsizetype!="both"){if(this._bodyBand){this._bodyBand._recreate_contents();}}else{this._updateRowSize(_a,_b);}}else{if(this.extendsizetype!="row"&&this.extendsizetype!="both"){this._enable_redraw_history["recreate_body"]=true;}else{if(!this._enable_redraw_history["updaterowsize"]){this._enable_redraw_history["updaterowsize"]=[];}this._enable_redraw_history["updaterowsize"].push([_a,_b]);}}this._isUserChangeBodyRowSize=true;}}else{return false;}}else{if(_i<_l.length){this._is_variable_bodyrowsize=true;var _n,_o,_p;for(var _q=0;_q<_k;_q++ ){_n=(_i*_k)+_q;_o=_m[_n];_p=_c;if(_o!=_p){_m[_n]=_p;_l[_i]+=(_p-_o);_g=true;}}if(_g){this._updateRowSizeExtendEx(_e._bodyrows,_l,_m,_i,true);if(this.enableredraw){if(this._bodyBand){this._bodyBand._recreate_contents();}}else{this._enable_redraw_history["recreate_body"]=true;}this._isUserChangeBodyRowSize=true;}}else{return false;}}}}else if(_f=="head"){if(_e&&_e._headrows){var _j=_e._headrows;var _k=_j.length;var _l=this._rowHeadList;var _m=this._rowHeadListSub;if(_b>=0){if(_b<_k){var _n=_b;var _o=_m[_n];var _p=_c;if(_o!=_p){_m[_n]=_p;_l[0]+=(_p-_o);_g=true;this._updateRowSizeExtendEx(_e._headrows,_l,_m,0);}}else{return false;}}else{var _n,_o,_p;for(var _q=0;_q<_k;_q++ ){_n=_q;_o=_m[_n];_p=_c;if(_o!=_p){_m[_n]=_p;_l[0]+=(_p-_o);_g=true;}}if(_g==true){this._updateRowSizeExtendEx(_e._headrows,_l,_m,0);}}if(_g){if(this.enableredraw){if(this._headBand){this._headBand._recreate_contents();}this._resizeBand();}else{this._enable_redraw_history["recreate_head"]=true;this._enable_redraw_history["resize_band"]=true;}this._isUserChangeHeadRowSize=true;}}}else if(_f=="summ"){if(_e&&_e._summrows){var _j=_e._summrows;var _k=_j.length;var _l=this._rowSummList;var _m=this._rowSummListSub;if(_b>=0){if(_b<_k){var _n=_b;var _o=_m[_n];var _p=_c;if(_o!=_p){_m[_n]=_p;_l[0]+=(_p-_o);_g=true;this._updateRowSizeExtendEx(_e._summrows,_l,_m,0);}}else{return false;}}else{var _n,_o,_p;for(var _q=0;_q<_k;_q++ ){_n=_q;_o=_m[_n];_p=_c;if(_o!=_p){_m[_n]=_p;_l[0]+=(_p-_o);_g=true;}}if(_g==true){this._updateRowSizeExtendEx(_e._summrows,_l,_m,0);}}if(_g==true){if(this.enableredraw){if(this._summBand){this._summBand._recreate_contents();}this._resizeBand();}else{this._enable_redraw_history["recreate_summ"]=true;this._enable_redraw_history["resize_band"]=true;}this._isUserChangeSummRowSize=true;}}}return _g;};_pGrid.getRealColSize=function(_a,_b){var _c=this._curFormat;var _d=this._getColFixCnt("left");var _e=this._getColFixCnt("body");var _f=this._getColFixCnt("right");var _g=_c._cols;var _h=_g.length;var _i="body";if(_b==true){if(_a>=0){_a+=_d;}else if(_a== -2){_a+=_d;_a+=_e;}if(_h<=_a){return -1;}}return _g[_a].size;};_pGrid.getRealRowSize=function(_a,_b,_c){var _d=this._curFormat;if(_c==undefined){_c=true;}var _e="none";if(_c){if(_a>=0){_e="body";}else if(_a== -1){_e="head";}else if(_a== -2){_e="summ";}}else{if(_d._headrows){if(_a<_d._headrows.length){_e="head";}else{_a-=_d._headrows.length;}}if(_e=="none"){if(this.summarytype=="top"||this.summarytype=="lefttop"){if(_d._summrows){if(_a<_d._summrows.length){_e="summ";}else{_a-=_d._headrows.length;}}if(_e=="none"){_e="body";}}else{if(_d._bodyrows){var _f=(this._hasTree)?this._treeIndexes.length:this._rowcount;if(_a<_f){_e="body";}else{_a-=_f;}}if(_e=="none"){if(_d._summrows){if(_a<_d._summrows.length){_e="summ";}}}}}}if(_e=="body"){if(_d&&_d._bodyrows){var _g=_a;if(this._hasTree){if(_g>=this._treeIndexes.length){return 0;}_g=this._treeIndexes[_g];}else{if(_g>=this._rowcount){return 0;}}var _h=_d._bodyrows;if(_b>=0){if(_b<_h.length){return this._rowSizeListSub[_g*_h.length+_b];}else{return 0;}}else{if(_g=0){if(_b<_h.length){return this._rowHeadListSub[_b];}else{return 0;}}else{return this._rowHeadList[0];}}}else if(_e=="summ"){if(_d&&_d._summrows){var _h=_d._summrows;if(_b>=0){if(_b<_h.length){return this._rowSummListSub[_b];}else{return 0;}}else{return this._rowSummList[0];}}}return 0;};_pGrid.getRealColFullSize=function(_a){var _b=this._curFormat;var _c=0;if(!_a){var _d=this._getColFixCnt("left");for(var _e=0;_e<_d;_e++ ){_c+=this.getRealColSize( -1,_e);}var _f=this._getColFixCnt("body");for(var _e=0;_e\n";_b+="\n";_b+="\n";_b+="\n";if(_a=="head"){_b+="\n";_b+="";_b+="\n";_b+="\n";_b+="\n";_b+="\n";}else if(_a=="summ"||_a=="summary"){_b+="\n";_b+="";_b+="\n";_b+="\n";_b+="\n";_b+="\n";}else if(_a=="body"){_b+="\n";_b+="";_b+="\n";_b+="\n";_b+="\n";_b+="\n";}_b+="\n";_b+="\n";this.set_formats(_b);return 0;};_pGrid.appendContentsRow=function(_a,_b){if(!_a){_a="body";}if(typeof (_a)=="number"){if(_a== -1){_a="head";}else if(_a== -2){_a="summ";}else if(_a>=0){_a="body";}}_a=_a.toLowerCase();if(!this._curFormat){return this.__createDefualtColFormat(_a);}if(!_b==undefined){_b=true;}if(_b==false){_a=this._getLastRowBand();}var _c=this._curFormat.appendContentsRow(_a,_b);if(_c>=0){this._recreate();this._initSelect();if(_a=="body"||_a>=0){if(rows=this._curFormat._headrows){_c+=rows.length;}if(this.summarytype=="top"||this.summarytype=="lefttop"){if(rows=this._curFormat._summrows){_c+=rows.length;}}}else if(_a=="summ"||_a=="summary"||_a== -2){if(rows=this._curFormat._headrows){_c+=rows.length;}if(this.summarytype!="top"&&this.summarytype!="lefttop"){if(rows=this._curFormat._bodyrows){_c+=rows.length;}}}}return _c;};_pGrid.appendContentsCol=function(_a,_b){if(!this._curFormat){return -1;}var _c=this._curFormat.appendContentsCol(_a,_b);if(_c>=0){this._recreate();}return _c;};_pGrid.insertContentsRow=function(_a,_b,_c){if(!this._curFormat){return -1;}if(arguments.length==1){_b=_a;_a="body";}var _d=this._curFormat.insertContentsRow(_a,_b,_c);if(_d>=0){this._recreate();if(_a=="body"||_a>=0){if(rows=this._curFormat._headrows){_d+=rows.length;}if(this.summarytype=="top"||this.summarytype=="lefttop"){if(rows=this._curFormat._summrows){_d+=rows.length;}}}else if(_a=="summ"||_a=="summary"||_a== -2){if(rows=this._curFormat._headrows){_d+=rows.length;}if(this.summarytype!="top"&&this.summarytype!="lefttop"){if(rows=this._curFormat._bodyrows){_d+=rows.length;}}}}return _d;};_pGrid.insertContentsCol=function(_a,_b,_c){if(!this._curFormat){return -1;}var _d=this._curFormat.insertContentsCol(_a,_b,_c);if(_d>=0){this._recreate();}return _d;};_pGrid.deleteContentsRow=function(_a,_b,_c){if(!this._curFormat){return -1;}if(arguments.length==1){_b=_a;_a="body";}var _d=this._curFormat.deleteContentsRow(_a,_b,_c);if(_d>=0){this._recreate();}return _d;};_pGrid.deleteContentsCol=function(_a,_b,_c){if(!this._curFormat){return -1;}var _d=this._curFormat.deleteContentsCol(_a,_b,_c);if(_d>=0){this._recreate();}return _d;};_pGrid.mergeContentsCell=function(_a,_b,_c,_d,_e,_f,_g){if(!this._curFormat){return -1;}_g=nexacro._toBoolean(_g);var _h=this._curFormat.mergeContentsCell(_a,_b,_c,_d,_e,_f,_g);if(_h>=0){this._recreate();}return _h;};_pGrid.splitContentsCell=function(_a,_b,_c,_d,_e,_f){if(!this._curFormat){return -1;}else{_f=nexacro._toBoolean(_f);var _g=this._curFormat.splitContentsCell(_a,_b,_c,_d,_e,_f);if(_g>0){this._recreate();}return _g;}};_pGrid.setBandProperty=function(_a,_b,_c){var _d=this._curFormat;if(!_d){return false;}_a=_a.toLowerCase();var _e=_d.setBandProperty(_a,_b,_c);if(_e){_a=_a.toLowerCase();if(_a=="body"){this._refreshBody(true);}else if(_a=="head"){this._refreshHead(true);}else{this._refreshSumm(true);}}return (_e!=null);};_pGrid.getBandProperty=function(_a,_b){var _c=this._curFormat;if(!_c){return null;}_a=_a.toLowerCase();return _c.getBandProperty(_a,_b);};_pGrid.setCellProperty=function(_a,_b,_c,_d){var _e=this._curFormat;if(!_e){return false;}_a=_a.toLowerCase();var _f=_e.setCellProperty(_a,_b,_c,_d);if(_f){_e._clearCellStyleCache(_a,_b);if(_c=="displaytype"&&_d=="tree"){this._setTreeCellinfo(_f);this._setTree(true);}else if(_c=="autosizecol"||_c=="autosizerow"){this._recreate_contents_all(true,true,false);}else if(_c=="text"){if(_a=="head"&&this._headAutoSize){this._recreate_contents_all(true,true,false);}else if(_a=="body"&&this._bodyAutoSize){this._recreate_contents_all(true,true,false);}else if(_a.indexOf("summ")>=0&&this._summAutoSize){this._recreate_contents_all(true,true,false);}else{this._refreshCell(_a,_b, -1,true);}}else if(_c=="suppress"){if(_d!=0){this._is_use_suppress=true;}else{_f._clearSuppressInfo();}this._refreshBody();}else if(_c=="suppressalign"&&this._is_use_suppress){this._destroyOverlayElements();this._refreshBody();}else{if(_c=="displaytype"||_c=="editdisplay"||_c=="combodisplay"||_c=="calendardisplay"){this._changeDisplayer=true;}this._refreshCell(_a,_b, -1,true);this._changeDisplayer=false;}}return (_f!=null);};_pGrid.getCellProperty=function(_a,_b,_c){var _d=this._curFormat;if(!_d){return null;}_a=_a.toLowerCase();return _d.getCellProperty(_a,_b,_c);};_pGrid.autoFitRow=function(_a){};_pGrid.autoFitCol=function(_a){var _b=this.autofittype;this.autofittype="col";if(_a){this.autofittype=_a;}if(this._curFormat){this._curFormat._resetOrgColSize(true);}var _c=this._applyAutofittype(true);this.autofittype=_b;return _c;};_pGrid.autoSizeRow=function(_a,_b,_c,_d){if(!this._binddataset||!this._curFormat||_b==undefined){return false;}if(_d==undefined||_d==true){_b=this._getDataRow(_b);}var _e=false;this._autoSizeRowProc=true;if(_a=="row"){if(_b>=0){this._is_variable_bodyrowsize=true;var _f=this._curFormat._bodyrows;var _g=_f.length;if(_c!=undefined){var _h=(_b*_f.length)+_c;var _i=this._rowSizeListSub[_h];var _j=this._getMaxSubRowSize(_b,_c);if(_i!=_j){this._rowSizeListSub[_h]=_j;this._rowSizeList[_b]+=(_j-_i);change=true;}}else{for(var _k=0;_k<_g;_k++ ){var _h=(_b*_f.length)+_k;var _i=this._rowSizeListSub[_h];var _j=this._getMaxSubRowSize(_b,_k);if(_i!=_j){this._rowSizeListSub[_h]=_j;this._rowSizeList[_b]+=(_j-_i);change=true;}}}if(change==true){this._updateRowSizeExtend();}this._recreate_contents_all(false,false,false);_e=true;}else if(_b== -1){var _f=this._curFormat._headrows;var _g=_f.length;if(_c!=undefined){var _h=_c;var _i=this._rowHeadListSub[_h];var _j=this._getMaxSubRowSize(_b,_c);if(_i!=_j){this._rowHeadListSub[_h]=_j;this._rowHeadList[0]+=(_j-_i);change=true;}}else{for(var _k=0;_k<_g;_k++ ){var _h=_k;var _i=this._rowHeadListSub[_h];var _j=this._getMaxSubRowSize(_b,_k);if(_i!=_j){this._rowHeadListSub[_h]=_j;this._rowHeadList[0]+=(_j-_i);change=true;}}}if(change==true){this._updateRowSizeExtend();}this._resizeBand();this._recreate_contents_all(false,false,false);_e=true;}else if(_b== -2){var _f=this._curFormat._summrows;var _g=_f.length;if(_c!=undefined){var _h=_c;var _i=this._rowSummListSub[_h];var _j=this._getMaxSubRowSize(_b,_c);if(_i!=_j){this._rowSummListSub[_h]=_j;this._rowSummList[0]+=(_j-_i);change=true;}}else{for(var _k=0;_k<_g;_k++ ){var _h=_k;var _i=this._rowSummListSub[_h];var _j=this._getMaxSubRowSize(_b,_k);if(_i!=_j){this._rowSummListSub[_h]=_j;this._rowSummList[0]+=(_j-_i);change=true;}}}if(change==true){this._updateRowSizeExtend();}this._resizeBand();this._recreate_contents_all(false,false,false);_e=true;}}this._autoSizeRowProc=false;return _e;};_pGrid.autoSizeCol=function(_a,_b,_c,_d){if(arguments.length==2){_c=_b;_b= -9;}if(_a=="col"){var _e;if(_c== -1){var _f=this._curFormat._cols;var _g=_f.length;for(var _h=0;_h<_g;_h++ ){_e=this._getMaxColDataSizeBand(_h);if(_e>=0&&this._setColSize( -9,_h,_e,_d,true,true,(_h!=_g-1))){change=true;}}}else if(_c>=0){_e=this._getMaxColDataSizeBand(_c);if(_e>=0){this._setColSize(_b,_c,_e,_d,true,true);}}}};_pGrid.isDropdownCalendar=function(){if(this._currentCellEditor&&this._currentCellEditor.visible==true&&this._currentCellEditor._type_name=="CalendarControl"){return this._currentCellEditor.isDropdown();}return false;};_pGrid.isDropdownCombo=function(){if(this._currentCellEditor&&this._currentCellEditor.visible==true&&this._currentCellEditor._type_name=="ComboControl"){return this._currentCellEditor.isDropdown();}return false;};_pGrid.moveToNextCell=function(){return this._moveToCell("next",true,false,undefined,undefined,true);};_pGrid.moveToPrevCell=function(){return this._moveToCell("prev",true,false,undefined,undefined,true);};_pGrid.showEditor=function(_a){var _b;if(_a===undefined){_a=true;}_a=nexacro._toBoolean(_a);if(this._showEditing==_a){return false;}if(_a){this.setFocus(false);_b=this._showEditor();}else{_b=this._hideEditor();}return _b;};_pGrid.dropdownCombo=function(){if(this._currentCellEditor&&this._currentCellEditor.visible==true&&this._currentCellEditor._type_name=="ComboControl"){this._currentCellEditor.dropdown();return true;}return false;};_pGrid.dropdownCalendar=function(){if(this._currentCellEditor&&this._currentCellEditor.visible==true&&this._currentCellEditor._type_name=="CalendarControl"){this._currentCellEditor.dropdown();return true;}return false;};_pGrid.getCurEditType=function(){var _a=this._getBodyCellInfo(this._selectinfo.curcell);if(_a){return _a._getAttrValue(_a.edittype,this._selectinfo.curdsrow);}return "";};_pGrid.getEditCaret=function(){if(this._showEditing){var _a=this._currentCellEditor;if(_a&&_a.getCaretPos){return _a.getCaretPos();}}};_pGrid.getEditSelect=function(){var _a=this._currentCellEditor;if(_a&&_a.getSelect){return _a.getSelect();}};_pGrid.getEditSelectedText=function(){var _a=this._currentCellEditor;if(_a&&_a.getSelectedText){return _a.getSelectedText();}return "";};_pGrid.getEditText=function(){if(this._showEditing){var _a=this._currentCellEditor;if(_a){return _a.text;}}};_pGrid.setEditCaret=function(_a){};_pGrid.setEditSelect=function(_a,_b){var _c=this._currentCellEditor;if(!_c){return false;}if(_a== -1){_c.setSelect(0,0);return true;}else{if(_c.setSelect){return _c.setSelect(_a,_b);}}return false;};_pGrid.setEditSelectedText=function(_a){};_pGrid.setEditText=function(_a){};_pGrid.updateToDataset=function(){if(this._showEditing){var _a=this._currentCellEditor;if(_a){_a._setDataset(false,this._currentCellRow);return true;}return false;}return false;};_pGrid.setTreeStatus=function(_a,_b){if(!this._hasTree){return false;}_b=nexacro._toBoolean(_b);var _c=this._treeIndexes;var _d=_c.length;var _e=this._bodyBand._get_rows();if(_d<=_a||!_e||_e.length==0){return false;}var _f=_c[_a];var _g=_e[0]._cells;var _h=this._treeCellinfo;var _i=_h._getEdittype(_f);var _j;if(_b){_j=this._setTreeState(_a,1,true);}else{_j=this._setTreeState(_a,0,true);}if(_j>0){if(nexacro._enableaccessibility&&(nexacro._accessibilitytype==4||nexacro._accessibilitytype==5)){var _k=this._getCurrentBodyCell(this._currentDSrow,_h._cellidx);if(_k){if(nexacro._accessibilitytype==4){_k._setFocus(false);}else{_k._setAccessibilityNotifyEvent();}}}return true;}return false;};_pGrid.getTreeStatus=function(_a){if(!this._hasTree){return -1;}var _b=this._treeIndexes;var _c=_b.length;var _d=this._bodyBand._get_rows();if(_c<=_a||!_d||_d.length==0){return -1;}var _e=_b[_a];var _f=this._treeStates[_e];var _g=_d[0]._cells;var _h=this._treeCellinfo;var _i=_h._getEdittype(_e);if(_i=="tree"){if(_h.treestate._bindtype==1){var _j=_h.treestate._bindexpr;var _k=this._binddataset.getColumn(_e,_j);if(_k>1){_f=_k;}}}if(_f==2){_f++ ;}return _f;};_pGrid.getTreeChildCount=function(_a,_b){if(this._hasTree){var _c=_a;if(_b==undefined){_b=true;}else{_b=nexacro._toBoolean(_b);}if(_b===false){_c=this.getDatasetRow(_a);}if(_c<0||this._rowcount<=_c){return 0;}var _d=this._treeCellinfo;var _e=_d._getTreeLevel(_c);var _f,_g= -1;var _h=0;for(var _i=_c+1;_i=_f){break;}if(_g>=0){if(_g==_f){_h++ ;}}else{if(_e<_f){_h++ ;_g=_f;}}}return _h;}return 0;};_pGrid.getTreeChildRow=function(_a,_b,_c){if(this._hasTree){var _d=_a;if(_c==undefined){_c=true;}else{_c=nexacro._toBoolean(_c);}if(_c===false){_d=this.getDatasetRow(_a);}if(_d<0||this._rowcount<=_d){return -1;}var _e=this._treeCellinfo;var _f=_e._getTreeLevel(_d);var _g,_h= -1;var _i= -1;var _j=0;for(var _k=_d+1;_k=_g){break;}if(_h>=0){if(_h<=_g){_j++ ;if(_b==_j){return _k;}_i=_k;}}else{if(_f<_g){_h=_g;if(_b==0){return _k;}_i=_k;}}}if(_b== -1){return _i;}}return -1;};_pGrid.getTreeParentRow=function(_a,_b){if(this._hasTree){var _c=_a;if(_b==undefined){_b=true;}else{_b=nexacro._toBoolean(_b);}if(_b===false){_c=this.getDatasetRow(_a);}if(_c<0||this._rowcount<=_c){return -1;}var _d=this._treeCellinfo;var _e=_d._getTreeLevel(_c);var _f;for(var _g=_c-1;_g>=0;_g-- ){_f=_d._getTreeLevel(_g);if(_e>_f){return _g;}}}return -1;};_pGrid.getTreeSiblingRow=function(_a,_b,_c){if(this._hasTree){var _d=_a;if(_b===undefined){_b=1;}if(_c==undefined){_c=true;}else{_c=nexacro._toBoolean(_c);}if(_c===false){_d=this.getDatasetRow(_a);}if(_d<0||this._rowcount<=_d){return -1;}var _e=this._treeCellinfo;var _f=_e._getTreeLevel(_d);var _g;var _h=0;if(_b<0){for(var _i=_d-1;_i>=0;_i-- ){_g=_e._getTreeLevel(_i);if(_f>_g){break;}else if(_f==_g){_h-- ;if(_b==_h){return _i;}}}}else if(_b>0){for(var _i=_d+1;_i_g){break;}else if(_f==_g){_h++ ;if(_b==_h){return _i;}}}}else{return _d;}}return -1;};_pGrid.getTreePath=function(_a,_b){if(this._hasTree){var _c=_a;if(_b==undefined){_b=true;}else{_b=nexacro._toBoolean(_b);}if(_b===false){_c=this.getDatasetRow(_a);}if(_c<0||this._rowcount<=_c){return "";}var _d=this._treeCellinfo;var _e=_d._getTreeLevel(_c);var _f=_d._getTreeStartLevel(_c);var _g=[];var _h=0;while(_c>=0){_g[_h]=_d._getValue(_c);_c=this.getTreeParentRow(_c);_h++ ;}var _i="";for(_h=_g.length-1;_h>=0;_h-- ){_i+=_g[_h];if(_h>0){_i+=this.treepathdelimiter;}}return _i;}return "";};_pGrid.getTreeRow=function(_a){if(this._hasTree){if(typeof (_a)=="string"){var _b=_a;var _c=this._rowcount;var _d;_a= -1;for(var _e=0;_e<_c;_e++ ){_d=this.getTreePath(_e,true);if(_d==_b){_a=_e;break;}}}if(_a>=0){var _f=this._treeIndexes;var _g=_f.length;for(var _h=0;_h<_g;_h++ ){if(_f[_h]==_a){return _h;}}}}return -1;};_pGrid.getDatasetRow=function(_a){if(_a>=0){if(this._hasTree){if(this._treeIndexes.length>_a){return this._treeIndexes[_a];}}else{if(this._rowcount>_a){return _a;}}}return -1;};_pGrid.isTreeLeafRow=function(_a,_b){if(this._hasTree){var _c=this.getTreeChildCount(_a,_b);if(_c==0){if(_b==undefined){_b=true;}else{_b=nexacro._toBoolean(_b);}var _d=_a;if(_b===false){_d=this.getDatasetRow(_a);}if(_d<0||this._rowcount<=_d){return false;}return true;}}return false;};_pGrid.isTreeRootRow=function(_a,_b){if(this._hasTree){var _c=_a;if(_b==undefined){_b=true;}else{_b=nexacro._toBoolean(_b);}if(_b===false){_c=this.getDatasetRow(_a);}if(_c<0||this._rowcount<=_c){return false;}var _d=this._treeCellinfo;var _e=_d._getTreeLevel(_c);var _f=_d._getTreeStartLevel(_c);if(_f==_e){return true;}}return false;};_pGrid.isTreeExpandedRow=function(_a,_b){if(this._hasTree){var _c=_a;if(_b==undefined){_b=true;}else{_b=nexacro._toBoolean(_b);}if(_b===false){_c=this.getDatasetRow(_a);}if(_c<0||this._rowcount<=_c){return false;}while(_c>=0){_c=this.getTreeParentRow(_c);if(_c<0){break;}var _d=this._treeIndexes;var _e=_d.length;if(_c>=0&&_e>0){var _f=this._treeStates[_c];if(_f==0){return false;}}}return true;}return false;};_pGrid.isTreeCollapsedRow=function(_a,_b){if(this._hasTree){var _c=_a;if(_b==undefined){_b=true;}else{_b=nexacro._toBoolean(_b);}if(_b===false){_c=this.getDatasetRow(_a);}if(_c<0||this._rowcount<=_c){return false;}while(_c>=0){_c=this.getTreeParentRow(_c);if(_c<0){break;}var _d=this._treeIndexes;var _e=_d.length;if(_c>=0&&_e>0){var _f=this._treeStates[_c];if(_f==0){return true;}}}}return false;};_pGrid.getCsvData=function(_a){};_pGrid.getHeadValue=function(_a){var _b=this._curFormat;if(_b&&_b._headcells&&_a>=0&&_b._headcells.length>_a){var _c=this._curFormat._headcells[_a];if(_c&&_c.text._bindtype!=0){return _c._getValue(this._currentDSrow);}}return null;};_pGrid.getSummValue=function(_a){var _b=this._curFormat;if(_b&&_b._summcells&&_a>=0&&_b._summcells.length>_a){var _c=this._curFormat._summcells[_a];if(_c&&_c.text._bindtype!=0){return _c._getValue(this._currentDSrow);}}return null;};_pGrid.getBindCellIndex=function(_a,_b){var _c=this._curFormat;if(!_c){return -1;}_a=_a.toLowerCase();if(_b){if(_a=="head"&&_c._headcells){var _d=_c._headcells;var _e=_d.length;var _f;for(var _g=0;_g<_e;_g++ ){_f=_d[_g];if(_f.text._bindexpr==_b){return _g;}}}else if(_a=="body"&&_c._bodycells){var _h=_c._bodycells;var _i=_h.length;var _f;for(var _g=0;_g<_i;_g++ ){_f=_h[_g];if(_f.text._bindexpr==_b){return _g;}}}else if(_a=="summ"&&_c._summcells){var _j=_c._summcells;var _k=_j.length;var _f;for(var _g=0;_g<_k;_g++ ){_f=_j[_g];if(_f.text._bindexpr==_b){return _g;}}}}return -1;};_pGrid._getDisplayCalendarCtrl=function(){if(!this._displaycalendarctrl){this._displaycalendarctrl=new nexacro.CalendarCtrl("displaycalendarctrl",0,0,0,0,this,false,true);}return this._displaycalendarctrl;};_pGrid.isAboveSelected=function(){};_pGrid._absolutelyResetScrollPos=function(_a){var _b=this._headBand;var _c=this._bodyBand;var _d=this._summBand;if(this._control_element){this._control_element._reset_scrollpos=_a;}if(_b&&_b._control_element){_b._control_element._reset_scrollpos=_a;}if(_c&&_c._control_element){_c._control_element._reset_scrollpos=_a;}if(_d&&_d._control_element){_d._control_element._reset_scrollpos=_a;}};_pGrid._no_use_onscroll_callback_after=false;_pGrid._adjustGridScrollRows_callback=function(_a){if(!this.vscrollbar){return;}var _b=this._control_element;var _c=_b.vscroll_limit;var _d=this.vscrollbar._pos;var _e=this._bodyBand;if(_d>_c){_d=_c;}if(_a){this._scroll_vpos_queue=[];}else{this._scroll_vpos_queue.pop();if(this._scroll_vpos_queue.length>0){this._aniframe_rowscroll.start();}}this._last_scroll_top=_b.scroll_top;this._toprowpos=this._getScreenTopRowPos(_d);this._bottomrowpos=this._getScreenBottomRowPos(_d);_e._update_rows=_e._matrix._adjustScrollRows(_d);_e._on_refresh_rows(true);this._no_use_onscroll_callback_after=true;_b.setElementVScrollPos(_d);this._MoveEditComp();this._updateSelector("vscroll",_d-this._last_scroll_top);this._adjustOverlayElements(false,false);};_pGrid._adjustGridScrollRows_callback_onscroll_after=function(_a){if(this._no_use_onscroll_callback_after==true){this._no_use_onscroll_callback_after=false;return;}var _b=this._bodyBand;this._toprowpos=this._getScreenTopRowPos(_a);this._bottomrowpos=this._getScreenBottomRowPos(_a);_b._update_rows=_b._matrix._adjustScrollRows(_a);_b._on_refresh_rows(true);this._MoveEditComp();this._adjustOverlayElements(false,false);};_pGrid._adjustGridScrollRows_callback_onscroll=function(){this._no_use_onscroll_callback_after=false;this._scroll_vpos_queue.pop();var _a=this.vscrollbar._pos;var _b=this._control_element;if(this._scroll_vpos_queue.length>0){this._aniframe_rowscroll.start();}this._last_scroll_top=_b.scroll_top;_b.setElementVScrollPos(_a);this._updateSelector("vscroll",_a-this._last_scroll_top);};_pGrid._adjustGridScrollCols_callback=function(_a){if(!this.hscrollbar){return;}var _b=this.hscrollbar._pos;var _c=this._control_element.scroll_left;if(_a){this._scroll_hpos_queue=[];}else{this._scroll_hpos_queue.pop();if(this._scroll_hpos_queue.length>0){this._aniframe_colscroll.start();}}this._control_element.setElementHScrollPos(_b);this._bodyBand._matrix._adjustColsDisplay(false,true);if(this._headBand){this._headBand._matrix._adjustColsDisplay(false,true);}if(this._summBand){this._summBand._matrix._adjustColsDisplay(false,true);}this._MoveEditComp();this._updateSelector("hscroll",_b-_c);this._adjustOverlayElements(false,true);};_pGrid._callback_onscroll=_pGrid._adjustGridScrollRows_callback_onscroll_after;_pGrid._is_over_scroll=0;_pGrid.on_vscroll=function(_a,_b){if(this.onvscroll&&this.onvscroll._has_handlers&&this._is_recreating==false){_b.fromobject=this;this.onvscroll._fireEvent(this,_b);}this._is_over_scroll=0;var _c=this.vscrollbar;if(!_c){return;}if(this._scrollpixel!="all"){if(_c._pos>_c._orgmax){this._is_over_scroll=_c._pos-this.vscrollbar._orgmax;}}var _d=this._control_element;if(!_d||!this._bodyBand||_b.type=="trackstart"||_b.type=="tracklastover"||_b.type=="trackfirstover"){return;}if(_b.type=="trackend"||_b.type=="first"||_b.type=="last"){this._procRefreshDOM=true;}if(nexacro.Browser=="Runtime"||(navigator.userAgent.indexOf("Android 4.1")> -1||navigator.userAgent.indexOf("Android 4.2")> -1||navigator.userAgent.indexOf("Android 4.3")> -1||navigator.userAgent.indexOf("Android 5.0")> -1)){this._adjustGridScrollRows_callback(true);}else{if(_b._evtkind=="fling"||_b._evtkind=="slide"||_b.type=="track"){this._bodyBand._control_element._setOnScrollCallbackTarget(this);if(!this._aniframe_rowscroll){var _e=this;this._scroll_vpos_queue=[];if(nexacro.isTouchInteraction&&nexacro.Browser!="Runtime"){this._aniframe_rowscroll=new nexacro.AnimationFrame(this,function(){_e._adjustGridScrollRows_callback_onscroll();});}else{this._aniframe_rowscroll=new nexacro.AnimationFrame(this,function(){_e._adjustGridScrollRows_callback();});}}var _f=this._scroll_vpos_queue.push(_b.pos);if(_f==1){this._aniframe_rowscroll.start();}}else{this._adjustGridScrollRows_callback(true);}}this._procRefreshDOM=undefined;return true;};_pGrid.on_hscroll=function(_a,_b){if(this.onhscroll&&this.onhscroll._has_handlers&&this._is_recreating==false){_b.fromobject=this;this.onhscroll._fireEvent(this,_b);}var _c=this._control_element;if(!_c||!this._bodyBand||_b.type=="trackstart"||_b.type=="tracklastover"||_b.type=="trackfirstover"){return;}if(_b.type=="trackend"||_b.type=="first"||_b.type=="last"){this._procRefreshDOM=true;}if(nexacro.Browser!="Runtime"){if(!this._aniframe_colscroll){var _d=this;this._scroll_hpos_queue=[];this._aniframe_colscroll=new nexacro.AnimationFrame(this,function(){_d._adjustGridScrollCols_callback();});}if(_b._evtkind=="fling"||_b._evtkind=="slide"||_b.type=="track"){var _e=this._scroll_hpos_queue.push(_b.pos);if(_e==1){this._aniframe_colscroll.start();}}else{this._adjustGridScrollCols_callback();}}else{this._adjustGridScrollCols_callback(true);}this._procRefreshDOM=undefined;return true;};_pGrid._isWheelScrollable=function(_a){var _b=this._control_element;if(!_b){return false;}var _c=_b.scroll_top;var _d=_b.container_maxheight;var _e=this._getBodyClientSize()[1];if((_c+_e>=_d&&_a<0)||(_c==0&&_a>0)){return false;}return true;};_pGrid._setVScrollDefaultAction=function(_a,_b){var _c,_d;if(this._scrollpixel!="all"){if(_b<0){if(_a.max>_a.pos){_c=_a.pos+this.wheelscrollrow;}else{_a._set_pixelpos(_a._pos-_b,"mousewheel");return;}}else{if(_a.min<_a.pos){_c=_a.pos-this.wheelscrollrow;}else{_a._set_pixelpos(_a._pos-_b,"mousewheel");return;}}}else{if(_b<0){_c=_a._scroll_reverse_convert(_a.pos,true)[0];_d=_a._scroll_reverse_convert(_a.max,true)[0];if(_d>_c){_c+=this.wheelscrollrow;}else{_a._set_pixelpos(_a._pos-_b,"mousewheel");return;}}else{_c=_a._scroll_reverse_convert(_a.pos,true)[0];_c-=this.wheelscrollrow;}}_a._set_rowpos(_c+this._getFixRowCnt(),"mousewheel");};_pGrid._makeEventInfo=function(_a,_b,_c){var _d={cell: -1,col: -1,row: -9,subrow: -1,mergecell: -1,mergecol: -1,mergerow: -1,pivotindex: -9};if(_a&&_a._type_name=="GridCell"){_d.cell=_a._cellidx;_d.col=_a._refobj._col;_d.row=this._getDataRow(_a._rowidx);_d.subrow=_a._refobj._row;if(_b){_d.mergecell=_b._cellidx;_d.mergecol=_b._refobj._col;_d.mergerow=_b._refobj._row;}}else{var _e=this._findBandObj(_c);if(_e){if(_e.id=="head"){_d.row= -1;}else if(_e.id=="summ"){_d.row= -2;}}}return _d;};_pGrid.on_fire_sys_onflingend=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){if(this._aniframe_rowscroll){this._aniframe_rowscroll.stop();}if(this._aniframe_colscroll){this._aniframe_colscroll.stop();}this._adjustGridScrollCols_callback(true);this._adjustGridScrollRows_callback(true);return true;};_pGrid._on_nodataareaclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(!this._is_alive){return;}if(this.enable){this.on_fire_onnodataareaclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);}return true;};_pGrid.on_fire_onnodataareaclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(this.onnodataareaclick&&this.onnodataareaclick._has_handlers){var _m=new nexacro.MouseEventInfo(_k,"onnodataareaclick",_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);return this.onnodataareaclick._fireEvent(this,_m);}return true;};_pGrid._on_nodataareadblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(!this._is_alive){return;}if(this.enable){this.on_fire_onnodataareadblclick(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);}return true;};_pGrid.on_fire_onnodataareadblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(this.onnodataareadblclick&&this.onnodataareadblclick._has_handlers){var _m=new nexacro.MouseEventInfo(_k,"onnodataareadblclick",_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l);return this.onnodataareadblclick._fireEvent(this,_m);}return true;};_pGrid.on_fire_user_ondragenter=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p){if(this._noFireDragFlag==true){return;}var _q=_p;_q=this._findCellObj(_q);if(_q&&_q._type_name=="GridCell"){if(_q.parentcell){_q=_q.parentcell;}}var _r=this._recalcXY(_q,_k,_l,false);_k=_r.canvasX;_l=_r.canvasY;_m=_r.clientX;_n=_r.clientY;return nexacro.Component.prototype.on_fire_user_ondragenter.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p);};_pGrid.on_fire_user_ondragleave=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p){if(this._noFireDragFlag==true){return;}var _q=_p;_q=this._findCellObj(_q);if(_q&&_q._type_name=="GridCell"){if(_q.parentcell){_q=_q.parentcell;}}var _r=this._recalcXY(_q,_k,_l,false);_k=_r.canvasX;_l=_r.canvasY;_m=_r.clientX;_n=_r.clientY;return nexacro.Component.prototype.on_fire_user_ondragleave.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p);};_pGrid.on_fire_user_ondragmove=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p){if(this._noFireDragFlag==true){return;}var _q=_p;_q=this._findCellObj(_q);var _r;if(_q&&_q._type_name=="GridCell"){if(_q.parentcell){_r=_q;_q=_q.parentcell;}}var _s=this._recalcXY(_q,_k,_l,false);_k=_s.canvasX;_l=_s.canvasY;_m=_s.clientX;_n=_s.clientY;if(this.ondragmove&&this.ondragmove._has_handlers){var _t=this._makeEventInfo(_q,_r,_p);var _u=_t.cell;var _v=_t.col;var _w=_t.mergecell;var _x=_t.mergecol;var _y=_t.mergerow;var _z=_t.pivotindex;var _aa=_t.row;var _ab=_t.subrow;var _ac=new nexacro.GridDragEventInfo(this,"ondragmove",_c,_d,_a,_b,_o,_p,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_u,_v,_w,_x,_y,_z,_aa,_ab);return this.ondragmove._fireUserEvent(this,_ac);}return false;};_pGrid.on_fire_sys_ondragmove=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p){if(!this._is_drag_sameselect){return this._areaselectMove(_k,_p,_k,_l);}else{this._is_drag_selecting=true;}};_pGrid._noFireDragFlag=false;_pGrid.on_fire_user_ondrag=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){var _n=_l;_n=this._findCellObj(_n);var _o;if(_n&&_n._type_name=="GridCell"){if(_n.parentcell){_o=_n;_n=_n.parentcell;}}var _p=this._recalcXY(_n,_g,_h,false);_g=_p.canvasX;_h=_p.canvasY;_i=_p.clientX;_j=_p.clientY;var _q=this._makeEventInfo(_n,_o,_l);var _r=_q.cell;var _s=_q.col;var _t=_q.mergecell;var _u=_q.mergecol;var _v=_q.mergerow;var _w=_q.pivotindex;var _x=_q.row;var _y=_q.subrow;this._noFireDragFlag=false;if(this.ondrag&&this.ondrag._has_handlers){var _z=new nexacro.GridDragEventInfo(this,"ondrag",this._getDragData(),null,this,_m,_k,_l,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_r,_s,_t,_u,_v,_w,_x,_y);if(this.ondrag._fireUserEvent(this,_z)==true){return [true,this,_m,_z.dragdata,_z.userdata];}else if(this.ondrag.defaultprevented==true){return [false,this,_m,_z.dragdata,_z.userdata];}}if(this._resizer_rowctrl&&this._resizer_rowctrl._is_tracking==true){var _aa=nexacro._getCachedValueObj("row-resize");this._setGlobalCursor(_aa,_n);}else if(this._resizer_colctrl&&this._resizer_colctrl._is_tracking==true){var _aa=nexacro._getCachedValueObj("col-resize");this._setGlobalCursor(_aa,_n);}else if(this.cellmovingtype!="none"||(this.ondrag&&this.ondrag._has_handlers)){if(_n&&_n._type_name=="GridCell"&&_n._rowidx== -1){var _ab=_n._refobj._col;var _ac=this._getColMergeInfo("head",_ab);var _ad=this._getColMergeInfo("body",_ab);var _ae=this._getColMergeInfo("summ",_ab);var _af=nexacro._getCachedValueObj("move");if(_ac[1]==1&&(_ad==null||_ad[1]==1)&&(_ae==null||_ae[1]==1)){if(this.cellmovingtype!="none"){this._movingcell=_n;this._setGlobalCursor(_af,_n);}}else{this._movingcell=null;}}if(this.ondrag&&this.ondrag._has_handlers){if(this._movingcell!=null){this._noFireDragFlag=true;return [true,this,_m,_z.dragdata,_z.userdata];}else{return [false,this,_m,_z.dragdata,_z.userdata];}}else if(_n&&_n._type_name=="GridCell"&&_n._rowidx== -1){this._noFireDragFlag=true;return [true,this,_m,this._getDragData(),null];}}return [false];};_pGrid.on_fire_user_ondrop=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p){var _q=_p;_q=this._findCellObj(_q);var _r;if(_q&&_q._type_name=="GridCell"){if(_q.parentcell){_r=_q;_q=_q.parentcell;}}var _s=this._recalcXY(_q,_k,_l,false);_k=_s.canvasX;_l=_s.canvasY;_m=_s.clientX;_n=_s.clientY;if(this._resizer_rowctrl&&this._resizer_rowctrl._is_tracking==true){this._setGlobalCursor(null,_q);}else if(this._resizer_colctrl&&this._resizer_colctrl._is_tracking==true){this._setGlobalCursor(null,_q);}else if(this.cellmovingtype!="none"){var _t=this._movingcell;var _u=this._curFormat;this._setGlobalCursor(null,_q);if(_t&&_t._is_alive&&_t!=_q&&_q._rowidx== -1){var _v=_t._refobj._col;var _w=_t._refobj._cellidx;var _x=_q._refobj._col;var _y=_t._refobj._colspan;var _z=this._getColMergeInfo("head",_x);_x=_z[0];var _aa=_z[1];_u._moveColumn(_v,_x,_y,_aa,this.cellmovingtype);this._addRefreshContents("cellmoving",this._headBand);this._addRefreshContents("cellmoving",this._bodyBand);this._addRefreshContents("cellmoving",this._summBand);}this._movingcell=null;}if(this._noFireDragFlag==true){this._noFireDragFlag=false;return;}if(this.ondrop&&this.ondrop._has_handlers){var _ab=this._makeEventInfo(_q,_r,_p);var _ac=_ab.cell;var _ad=_ab.col;var _ae=_ab.mergecell;var _af=_ab.mergecol;var _ag=_ab.mergerow;var _ah=_ab.pivotindex;var _ai=_ab.row;var _aj=_ab.subrow;var _ak=new nexacro.GridDragEventInfo(this,"ondrop",_c,_d,_a,_b,_o,_p,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_ac,_ad,_ae,_af,_ag,_ah,_ai,_aj);return this.ondrop._fireUserEvent(this,_ak);}return false;};_pGrid._mouseSelection=function(_a,_b,_c,_d,_e,_f,_g,_h){var _i=this._currentCellEditor;var _j=_g;var _k=true;while(_j){if(_j==_i||_j instanceof nexacro.GridScrollBarCtrl||_j instanceof nexacro.ScrollBarCtrl){_k=false;break;}_j=_j.parent;}if(_k&&_i){this._hideEditor();}if(this._resizer_colctrl&&this._resizer_colctrl._is_tracking){return;}if(this._resizer_rowctrl&&this._resizer_rowctrl._is_tracking){return;}if(this._down_scroll_top>=0&&this._down_scroll_top!=this._last_scroll_top){return;}if(_a&&_a._type_name=="GridCell"){this._lbuttondown_proc=true;var _l=_a._band.id;var _m=this._on_grid_lbuttondown(_a,_l,_b,_c,_h);if(!_a._is_alive||_h){return;}if(this._showEditorCell){if(nexacro._toBoolean(this.readonly)==false){if(_m){var _n=_a;if(_n&&_n._hasEditor()){_n._showEditor();var _o=this._getDataRow(_n._rowidx);this._beforeEditRowIdx=_o;this._beforeEditCellIdx=_n._cellidx;this._showEditing=true;_n._refobj._editingRow=_o;_n._editshowing=true;var _i=this._currentCellEditor;if(_i&&_i.setCaretPos&&!_i.autoselect){_i.setCaretPos(0);}}}else{this._showEditor();}}this._showEditorCell=false;this._showEditRowIdx= -1;this._showEditCellIdx= -1;}if(this.selectchangetype=="down"&&nexacro._toBoolean(this.readonly)==false){var _o=this._getDataRow(_a._rowidx);var _p=_a._refobj._getDisplaytype(_o);if(_p=="checkbox"){if(this.cellclickbound=="cell"){_a._needToggle("onlbuttondown",_a);}else{if(_a!=_g&&_a._subComp&&_a._subComp._toggleCheck){_a._subComp._toggleCheck();}}}else{_a._needToggle("onlbuttondown",_a);}}this._lbuttondown_proc=false;}};_pGrid._common_fire_sys_lbuttondown=function(_a,_b,_c,_d,_e,_f,_g){if(!this._is_alive){return;}if(this.selectchangetype=="up"){if(this._isAreaSelect()&&this._selectscrollmode=="select"){this._mouseSelection(_a,_b,_c,_d,_e,_f,_g);}else if(this.selecttype=="multirow"){this._mouseSelection(_a,_b,_c,_d,_e,_f,_g,true);}}else{this._mouseSelection(_a,_b,_c,_d,_e,_f,_g);}if(this._is_down_act){this._on_last_lbuttonup(true);}};_pGrid._common_fire_user_lbuttondown=function(_a,_b,_c,_d,_e,_f,_g){if(!this._is_alive){return;}this._resizerStart(_d,_e,_a,"down");var _h=this._resizer_colctrl;var _i=this._resizer_rowctrl;if(_h&&_h._is_range){var _j=this._getWindow();_h._setTracksize(this._client_height);if(_h._direction=="horizon"){_h.move(_d,this._client_top,1,_h._tracksize);}nexacro._setTrackInfo(_j,_h,_j._curWindowX,_j._curWindowY);}else if(_i&&_i._is_range){var _j=this._getWindow();_i._setTracksize(this._client_width);if(_i._direction=="vertical"){_i.move(this._client_left,_e,_i._tracksize,1);}nexacro._setTrackInfo(_j,_i,_j._curWindowX,_j._curWindowY);}if(this._select_ctrl){this._select_ctrl._initTrackInfo();}};_pGrid._recalcTouchInfosXY=function(_a,_b,_c){var _d,_e;for(var _f=0;_f<_b.length;_f++ ){if(_d=_b[_f]){_e=this._recalcXY(_a,_d.canvasX,_d.canvasY,_c);_d.canvasX=_e.canvasX;_d.canvasY=_e.canvasY;_d.clientX=_e.clientX;_d.clientY=_e.clientY;}}};_pGrid._getRecalcCanvasXY=function(_a,_b,_c){if(this._recalcXY_info){_b=this._recalcXY_info[0];_c=this._recalcXY_info[1];this._recalcXY_info=null;}_b+=this._adjust_left-this._scroll_left||0;_c+=this._adjust_top-this._scroll_top||0;return [_b,_c];};_pGrid._recalcXY=function(_a,_b,_c,_d){var _e=_b;var _f=_c;if(_a._type_name=="GridCell"){if(_d){var _h=_a._setPositionInGrid(null,false,true);_e=_b+_h.orgl;_f=_c+_h.orgt;}else{var _i=_a._refobj._area;var _j=_a._band.id;if(_i=="body"){_e=_b+this._curFormat.leftWidth;_e-=this._getScrollLeft();}else if(_i=="right"){var _k=_a.parent;var _h=_k._getAreaRect(_i);var _l=_h.left;_e=_b+_l;}if(_j=="body"&&!_a.parent._fixed){_f-=this._getScrollTop();_f+=this._fixed_height;}}}this._recalcXY_info=[_e,_f];var _g=this._getClientXY(_e,_f);return {canvasX:_e,canvasY:_f,clientX:_g[0],clientY:_g[1]};};_pGrid.on_fire_user_ontouchstart=function(_a,_b,_c,_d,_e){return this.on_fire_ontouchstart(_a,_b,_c,_d,true,_e);};_pGrid.on_fire_sys_ontouchstart=function(_a,_b,_c,_d,_e){return this.on_fire_ontouchstart(_a,_b,_c,_d,false,_e);};_pGrid._down_scroll_top= -1;_pGrid.on_fire_ontouchstart=function(_a,_b,_c,_d,_e,_f){var _g=_d;_g=this._findCellObj(_g);this._recalcTouchInfosXY(_g,_b,_f);var _h=nexacro._getFirstTouchInfo(_b);var _i;if(_g&&_g._type_name=="GridCell"){if(_g.parentcell){_i=_g;_g=_g.parentcell;}}var _j=false;if(this.ontouchstart&&this.ontouchstart._has_handlers){var _k=this._makeEventInfo(_g,_i,_d);var _l=_k.cell;var _m=_k.col;var _n=_k.mergecell;var _o=_k.mergecol;var _p=_k.mergerow;var _q=_k.pivotindex;var _r=_k.row;var _s=_k.subrow;var _t=new nexacro.TouchEventInfo(this,"ontouchstart",_a,_b,_c,_d);if(_e){_j=this.ontouchstart._fireUserEvent(this,_t);}else{_j=this.ontouchstart._fireSysEvent(this,_t);}}this._down_scroll_top=this._last_scroll_top;if(_h){if(_e){this._resizerStart(_h.canvasX,_h.canvasY,_g,"down");this._common_fire_user_lbuttondown(_g,false,false,_h.canvasX,_h.canvasY,_c,_d);}else{if(this._selectscrollmode=="select"){if(_g._band&&_g._band.id=="body"){if(this._isAreaSelect()){this._common_fire_sys_lbuttondown(_g,false,false,_h.canvasX,_h.canvasY,_c,_d);}if(this.selectchangetype=="down"){this._mouseSelection(_g,false,false,_h.canvasX,_h.canvasY,_c,_d);}}}}}return _j;};_pGrid.on_lbuttondown_basic_action=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){if(nexacro.isTouchInteraction){this._down_scroll_top=this._last_scroll_top;}return nexacro.Component.prototype.on_lbuttondown_basic_action.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m);};_pGrid.on_fire_user_onlbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){return this.on_fire_onlbuttondown(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,true,_m);};_pGrid.on_fire_sys_onlbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){return this.on_fire_onlbuttondown(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,false,_m);};_pGrid.on_fire_onlbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=_l;_o=this._findCellObj(_o);var _p;if(_o&&_o._type_name=="GridCell"){if(_o.parentcell){_p=_o;_o=_o.parentcell;}}var _q=this._recalcXY(_o,_g,_h,_n);_g=_q.canvasX;_h=_q.canvasY;_i=_q.clientX;_j=_q.clientY;var _r=false;if(this.onlbuttondown&&this.onlbuttondown._has_handlers){var _s=this._makeEventInfo(_o,_p,_l);var _t=this._getRootComponent(_k);var _u=_s.cell;var _v=_s.col;var _w=_s.mergecell;var _x=_s.mergecol;var _y=_s.mergerow;var _z=_s.pivotindex;var _aa=_s.row;var _ab=_s.subrow;var _ac=new nexacro.GridMouseEventInfo(_t,"onlbuttondown",_u,_v,_w,_x,_y,_z,_aa,_ab,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);if(_m){_r=this.onlbuttondown._fireUserEvent(this,_ac);}else{_r=this.onlbuttondown._fireSysEvent(this,_ac);}}if(nexacro.isTouchInteraction){if(_m){this._resizerStart(_g,_h,_o,"down");this._common_fire_user_lbuttondown(_o,_c,_d,_g,_h,_k,_l);}else{if(this._selectscrollmode=="select"){if(_o._band&&_o._band.id=="body"){if(this._isAreaSelect()){this._common_fire_user_lbuttondown(_o,_c,_d,_g,_h,_k,_l);}}}}}else{if(_m){this._common_fire_user_lbuttondown(_o,_c,_d,_g,_h,_k,_l);}else{this._common_fire_sys_lbuttondown(_o,_c,_d,_g,_h,_k,_l);}}return _r;};_pGrid.on_fire_user_onrbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){var _m=_l;_m=this._findCellObj(_m);var _n;if(_m&&_m._type_name=="GridCell"){if(_m.parentcell){_n=_m;_m=_m.parentcell;}}var _o=this._recalcXY(_m,_g,_h,false);_g=_o.canvasX;_h=_o.canvasY;_i=_o.clientX;_j=_o.clientY;if(this.onrbuttondown&&this.onrbuttondown._has_handlers){var _p=this._makeEventInfo(_m,_n,_l);var _q=this._getRootComponent(_l);var _r=_p.cell;var _s=_p.col;var _t=_p.mergecell;var _u=_p.mergecol;var _v=_p.mergerow;var _w=_p.pivotindex;var _x=_p.row;var _y=_p.subrow;var _z=new nexacro.GridMouseEventInfo(_q,"onrbuttondown",_r,_s,_t,_u,_v,_w,_x,_y,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);return this.onrbuttondown._fireUserEvent(this,_z);}return false;};_pGrid.on_fire_user_onmousedown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){return this.on_fire_onmousedown(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,true);};_pGrid.on_fire_sys_onmousedown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){return this.on_fire_onmousedown(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,false);};_pGrid.on_fire_onmousedown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){var _n=_l;_n=this._findCellObj(_n);var _o;if(_n&&_n._type_name=="GridCell"){if(_n.parentcell){_o=_n;_n=_n.parentcell;}}var _p=this._recalcXY(_n,_g,_h,false);_g=_p.canvasX;_h=_p.canvasY;_i=_p.clientX;_j=_p.clientY;var _q=false;if(this.onmousedown&&this.onmousedown._has_handlers){var _r=this._makeEventInfo(_n,_o,_l);var _s=this._getRootComponent(_k);var _t=_r.cell;var _u=_r.col;var _v=_r.mergecell;var _w=_r.mergecol;var _x=_r.mergerow;var _y=_r.pivotindex;var _z=_r.row;var _aa=_r.subrow;var _ab=new nexacro.GridMouseEventInfo(_s,"onmousedown",_t,_u,_v,_w,_x,_y,_z,_aa,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);if(_m){_q=this.onmousedown._fireUserEvent(this,_ab);}else{_q=this.onmousedown._fireSysEvent(this,_ab);}}if(_m){this._common_fire_user_lbuttondown(_n,_c,_d,_g,_h,_k,_l);}else{this._common_fire_sys_lbuttondown(_n,_c,_d,_g,_h,_k,_l);}return _q;};_pGrid._clearDestroyEditor=function(_a){var _b=this._destroyeditors;if(_b.length){for(var _c=0;_c<_b.length;_c++ ){if(_a&&_b.length<=5){break;}if(_b[_c]._is_alive){_b[_c].destroy();}_b[_c]=null;_b.splice(_c,1);_c-- ;}}};_pGrid._resetFixSize=function(){var _a=this._rowSizeList;var _b=0,_c=0;var _d=this._fixed_startrow;var _e=this._fixed_endrow;if(_d<0){return;}for(var _f=0;_f<_a.length;_f++ ){_b+=_a[_f];if(_d>_f){continue;}_c+=_a[_f];if(_e==_f){break;}}this._fixed_height=_c;this._fixedrow_height=_b;};_pGrid.setFixedRow=function(_a){this._setFixedRow(_a,undefined);};_pGrid._setFixedRow=function(_a,_b){if(this._hasTree){return;}var _c=(_a<0)?false:true;var _d,_e=this._endrowpos;_d=this._fixed_startrow;if(_d<0){_d=this._toprowpos[0];}if(_a>=0&&(_a<_d||_a>_e)){return;}if(_c){if(this._fixed_height){this._setFixedRow( -1);}}var _f=this._bodyBand;if(_c){var _g=this._getGridRowCount();var _h=this._toprowpos[0];var _i=0,_j=0;var _k=false;var _l=0;for(var _m=0;_m<_g;_m++ ){this._fixed_rowcnt++ ;_l=this._getRowSize(_m);_j+=_l;if(_m>=_h){if(this._fixed_startrow<0){this._fixed_startrow=_m;}_i+=_l;_k=true;}if(_m>=_a){break;}}if(_k){this._fixedrow_height=_j;this._fixed_endrow=_a;this._fixed_height=_i;if(!_b){this._recreate_contents_all(false,false,true,true);}}else{this._fixed_startrow= -9;this._fixed_endrow= -9;this._fixed_height=0;this._fixedrow_height=0;this._fixed_rowcnt=0;}}else{var _d=this._fixed_startrow;this._fixed_endrow= -9;this._fixed_height=0;this._fixedrow_height=0;this._fixed_rowcnt=0;this._fixed_startrow= -9;if(!_b){this._recreate_contents_all(false,false,false,true);if(this.vscrollbar&&_d>=0){this.vscrollbar._set_rowpos(_d);}}}};_pGrid._getFixRowCnt=function(){return (this._bodyBand)?this._fixed_rowcnt:0;};_pGrid._checkInclude=function(_a,_b,_c,_d,_e){if(_a.start_column<=_c&&_a.end_column>=_c){if(_a.start_row<=_d&&_a.end_row>=_d){if(_e==undefined||_a.start_subrow==undefined){return true;}else{if(_a.start_row<_d&&_a.end_row>_d){return true;}if(_a.start_row==_a.end_row){if(_a.start_subrow<=_e&&_a.end_subrow>=_e){return true;}}else{if(_a.start_row==_d){if(_a.start_subrow<=_e&&_b>_e){return true;}}if(_a.end_row==_d){if(0<=_e&&_a.end_subrow>=_e){return true;}}}}}}return false;};_pGrid._getFakeMergeCellInfos=function(_a,_b,_c,_d,_e,_f,_g,_h){var _i=[];var _j,_k,_l,_m;for(var _n=0;_n<_a.length;_n++ ){col1=_a[_n]._col;colspan=_a[_n]._colspan;col2=col1+colspan-1;row1=_a[_n]._row;rowspan=_a[_n]._rowspan;row2=row1+rowspan-1;if((_b<=col1&&_c>=col1)||(_b<=col2&&_c>=col2)||(col1<=_b&&col2>=_b)||(col1<=_c&&col2>=_c)){if(_d>=0){_j=_d*_h+row1;_k=_d*_h+_f;_l=_e*_h+row2;_m=_e*_h+_g;}else{_j=row1;_k=_f;_l=row2;_m=_g;}if((_k<=_j&&_m>=_j)||(_k<=_l&&_m>=_l)||(_j<=_k&&_l>=_k)||(_j<=_m&&_l>=_m)){_i.push(_a[_n]);}}}return _i;};_pGrid.setFakeMerge=function(_a,_b,_c,_d,_e,_f){this._setFakeMerge(_a,_c,_e,_b,_d,_f,false);};_pGrid._getFakeMergeCellObjs=function(_a){var _b;var _c=[];var _d=this._curFormat;var _e;if(_a.start_row== -1){_b=this._headBand;_e=_d._headrows.length;}else if(_a.start_row== -2){_b=this._summBand;_e=_d._summrows.length;}else if(_a.start_row>=0){_b=this._bodyBand;_e=_d._bodyrows.length;}if(!_b){return _c;}var _f=_b._get_rows();var _g;var _h=_a.start_column;var _i=_a.end_column;var _j=_a.start_row;var _k=_a.end_row;var _l=_a.start_subrow;var _m=_a.end_subrow;var _n;var _o,_p,_q,_r;var _s;for(var _t=0;_t<_f.length;_t++ ){_n=this._getDataRow(_f[_t]._rowidx);if(_n>=_j&&_n<=_k){_g=_f[_t]._cells;for(var _u=0;_u<_g.length;_u++ ){_s=_g[_u]._refobj;if(_s._col>=_h&&_s._col<=_i){if(_l==undefined){_c.push(_g[_u]);}else{if(_j>=0){_o=_n*_e+_s._row;_p=_j*_e+_l;_q=_n*_e+_s._row+_s._rowspan-1;_r=_k*_e+_m;}else{_o=_s._row;_p=_l;_q=_s._row+_s._rowspan-1;_r=_m;}if((_p<=_o&&_r>=_o)||(_p<=_q&&_r>=_q)||(_o<=_p&&_q>=_p)||(_o<=_r&&_q>=_r)){_c.push(_g[_u]);}}}}}}return _c;};_pGrid._is_use_fakemerge=false;_pGrid._setFakeMerge=function(_a,_b,_c,_d,_e,_f,_g){var _h=this._curFormat;var _i;var _j;var _k;if(_a>_d||_a<0||_d<0){return false;}if(_b== -1||_e== -1){if(_b!=_e){return false;}if(!_h._headrows){return false;}_i=_h._headcells;_j=_h._headrows.length;_k="head";if(_f<_c){return false;}}else if(_b== -2||_e== -2){if(_b!=_e){return false;}if(!_h._summrows){return false;}_i=_h._summcells;_j=_h._summrows.length;_k="summ";if(_f<_c){return false;}}else{if(_b<0||_e<0){return false;}if(_b>_e){return false;}if(!_h._bodyrows){return false;}_i=_h._bodycells;_j=_h._bodyrows.length;_k="body";}if(_c==undefined){_c=0;}if(_f==undefined){_f=_j-1;}if(_j<=_c||_j<=_f){return false;}var _l,_m,_n,_o=false;var _p,_q,_r;var _s=[];var _t=null;var _u,_v,_w,_x;for(var _ac=0;_ac<_i.length;_ac++ ){_t=_i[_ac];_l=_t._col;_m=_t._colspan;_n=_l+_m-1;_p=_t._row;_q=_t._rowspan;_r=_p+_q-1;if((_a<=_l&&_d>=_l)||(_a<=_n&&_d>=_n)||(_l<=_a&&_n>=_a)||(_l<=_d&&_n>=_d)){if(_b>=0){_u=_b*_j+_p;_v=_b*_j+_c;_w=_e*_j+_r;_x=_e*_j+_f;}else{_u=_p;_v=_c;_w=_r;_x=_f;}if((_v<=_u&&_x>=_u)||(_v<=_w&&_x>=_w)||(_u<=_v&&_w>=_v)||(_u<=_x&&_w>=_x)){if(_t.suppress!=0){return false;}var _ae=false;if(_t._colspan>1){var _af=_t._col+_t._colspan-1;if(_t._col<_a){_ae=true;_a=_t._col;}if(_af>_d){_ae=true;_d=_af;}}if(_t._rowspan>1){if(_u<_v){_ae=true;_c=_t._row;}if(_w>_x){_ae=true;_f=_t._row+_t._rowspan-1;}}if(_ae==true){_s=[];_ac=0;}_s.push(_t);}}}var _y={start_column:_a,start_row:_b,start_subrow:_c,end_column:_d,end_row:_e,end_subrow:_f,cellinfos:_s};var _z=this._fake_mergecell_arr;var _aa=_z.length;var _ab;var _ac=0;var _ad=[];for(;_ac<_aa;_ac++ ){if(this._checkInclude(_z[_ac],_j,_a,_b,_c)){_ad.push(_ac);}else if(this._checkInclude(_z[_ac],_j,_a,_e,_f)){_ad.push(_ac);}else if(this._checkInclude(_z[_ac],_j,_d,_b,_c)){_ad.push(_ac);}else if(this._checkInclude(_z[_ac],_j,_d,_e,_f)){_ad.push(_ac);}else if(this._checkInclude(_y,_j,_z[_ac].start_column,_z[_ac].start_row,_z[_ac].start_subrow)){_ad.push(_ac);}else if(this._checkInclude(_y,_j,_z[_ac].start_column,_z[_ac].end_row,_z[_ac].end_subrow)){_ad.push(_ac);}else if(this._checkInclude(_y,_j,_z[_ac].end_column,_z[_ac].start_row,_z[_ac].start_subrow)){_ad.push(_ac);}else if(this._checkInclude(_y,_j,_z[_ac].end_column,_z[_ac].end_row,_z[_ac].end_subrow)){_ad.push(_ac);}}if(_ad.length==0){for(var _ac=0;_ac<_s.length;_ac++ ){if(_s[_ac]._fakemerge_infos==null){_s[_ac]._fakemerge_infos=[];}}_z.push(_y);this._is_use_fakemerge=true;for(var _ac=0;_ac<_s.length;_ac++ ){_h._clearCellStyleCache(_k,_s[_ac]._cellidx);this._refreshCell(_k,_s[_ac]._cellidx, -1,true);}}else{if(_g){return false;}for(var _ac=0;_ac<_ad.length;_ac++ ){var _ag=_ad[_ac];var _ah=_z.splice(_ag-_ac,1)[0];var _ai=this._getFakeMergeCellInfos(_i,_ah.start_column,_ah.end_column,_ah.start_row,_ah.end_row,_ah.start_subrow,_ah.end_subrow,_j);for(var _aj=0;_aj<_ai.length;_aj++ ){for(var _ak=_ah.start_row;_ak<=_ah.end_row;_ak++ ){_ai[_aj]._fakemerge_infos[_ak+2]=undefined;}_h._clearCellStyleCache(_k,_ai[_aj]._cellidx);this._refreshCell(_k,_ai[_aj]._cellidx, -1,true);}for(var _aj=0;_aj<_s.length;_aj++ ){for(var _ak=_b;_ak<=_e;_ak++ ){_s[_aj]._fakemerge_infos[_ak+2]=undefined;}_h._clearCellStyleCache(_k,_s[_aj]._cellidx);this._refreshCell(_k,_s[_aj]._cellidx, -1,true);}}if(_z.length==0){this._is_use_fakemerge=false;}}this._adjustOverlayElements(false,false,true);return true;};_pGrid._checkFakeMerge=function(_a,_b){if(!_a._fakemerge_infos){return "";}if(_a._fakemerge_infos[_b+2]){return _a._fakemerge_infos[_b+2];}var _c=this._fake_mergecell_arr;var _d=_c.length;var _e;var _f=this._curFormat;var _g;if(_b== -1){_e=(_f._headrows)?_f._headrows.length:0;_g="head";}else if(_b== -2){_e=(_f._summrows)?_f._summrows.length:0;_g="summ";}else if(_b>=0){_e=(_f._bodyrows)?_f._bodyrows.length:0;_g="body";}if(!_e){return "";}if(_d==0){return "";}var _h=_a._col,_i=_a._col+_a._colspan-1,_j=_a._row,_k=_a._row+_a._rowspan-1,_l=_a._area;for(var _m=0;_m<_d;_m++ ){if(this._checkInclude(_c[_m],_e,_h,_b,_j)){if(this._checkInclude(_c[_m],_e,_i,_b,_j)){if(this._checkInclude(_c[_m],_e,_h,_b,_k)){if(this._checkInclude(_c[_m],_e,_i,_b,_k)){var _n="";if(_l!="right"){if(_i<_c[_m].end_column){_n+="right";}}else{if(_h>_c[_m].start_column){_n+="left";}}if(_g!="summ"){if(_b<_c[_m].end_row){_n+="bottom";}else if(_b==_c[_m].end_row){if(_c[_m].end_subrow==undefined&&_k<_e-1){_n+="bottom";}else if(_k<_c[_m].end_subrow){_n+="bottom";}}}else{if(_b>_c[_m].start_row){_n+="top";}else if(_b==_c[_m].start_row){if(_c[_m].start_subrow==undefined&&_j>0){_n+="top";}else if(_j>_c[_m].start_subrow){_n+="top";}}}_n+="fake";_a._fakemerge_infos[_b+2]=_n;return _n;}}}}}return "";};_pGrid._on_last_lbuttonup=function(_a){if(this._movingcell){this._setGlobalCursor(null,this);this._movingcell=null;}this._is_down_act=false;this._clearDestroyEditor(true);var _b=this._after_recreate_contents_all;if(_b!=null){this._is_after_recreate=true;this._recreate_contents_all(_b[0],_b[1],_b[2],_b[3],_b[4]);this._after_recreate_contents_all=null;this._is_after_recreate=false;}};_pGrid._on_last_keyup=function(_a){this._is_down_act=false;this._clearDestroyEditor(true);var _b=this._after_recreate_contents_all;if(_b!=null){this._is_after_recreate=true;this._recreate_contents_all(_b[0],_b[1],_b[2],_b[3],_b[4]);this._after_recreate_contents_all=null;this._is_after_recreate=false;}};_pGrid._common_fire_sys_lbuttonup=function(_a,_b,_c,_d){if(!this._is_alive){return;}if(!this.enable){return true;}if(_a&&_a._type_name=="GridCell"){var _e=this._getDataRow(_a._rowidx);if(this._isFakeCell(_e)){this._is_drag_selectstart=false;this._is_drag_selecting=false;this._is_drag_sameselect=false;return true;}if(_c==false&&_d==false&&this._is_drag_selecting==false&&_e>=0){if(this._isMultiSelected()){if(this._isIncludeSelectpos(_a._cellidx,_e)){this._clrMultiSelect();this._refreshAll(true);this._ChangeSelect(this._selectinfo.curcell,this._selectinfo.curcol,this._selectinfo.curdsrow,this._selectinfo.cursubrow,this._selectinfo.curpvt,false,this._selectinfo.curcell,this._selectinfo.curcol,this._selectinfo.curdsrow,this._selectinfo.cursubrow,this._selectinfo.curpvt,"body","lbuttonup");}}}}this._is_drag_selectstart=false;this._is_drag_selecting=false;this._is_drag_sameselect=false;this._execRefreshContents("colsizing",false,true);this._execRefreshContents("rowsizing",false,false);this._execRefreshContents("cellmoving",true);this._exeFuncQueue("colsizing");this._exeFuncQueue("rowsizing");};_pGrid._is_down_act=false;_pGrid._cancelEvent=function(_a){this._endExtraTrack();this._is_drag_selectstart=false;this._is_drag_selecting=false;this._is_down_act=this._isDownActionKeyMouse();};_pGrid.on_fire_user_ontouchend=function(_a,_b,_c,_d,_e){return this.on_fire_ontouchend(_a,_b,_c,_d,true,_e);};_pGrid.on_fire_sys_ontouchend=function(_a,_b,_c,_d,_e){return this.on_fire_ontouchend(_a,_b,_c,_d,false,_e);};_pGrid.on_fire_ontouchend=function(_a,_b,_c,_d,_e,_f){var _g=_d;_g=this._findCellObj(_g);this._recalcTouchInfosXY(_g,_b,_f);var _h;if(_g&&_g._type_name=="GridCell"){if(_g.parentcell){_h=_g;_g=_g.parentcell;}}var _i=false;if(this.ontouchend&&this.ontouchend._has_handlers){var _j=this._makeEventInfo(_g,_h,_d);var _k=_j.cell;var _l=_j.col;var _m=_j.mergecell;var _n=_j.mergecol;var _o=_j.mergerow;var _p=_j.pivotindex;var _q=_j.row;var _r=_j.subrow;var _s=new nexacro.TouchEventInfo(this,"ontouchend",_a,_b,_c,_d);if(_e){_i=this.ontouchend._fireUserEvent(this,_s);}else{_i=this.ontouchend._fireSysEvent(this,_s);}}if(!_e){this._common_fire_sys_lbuttonup(_g,false,false,false);}return _i;};_pGrid._isCheckAlive=function(_a){var _b=_a;while(_b!=this){if(!_b||_b._is_alive==false){return false;}_b=_b.parent;}return true;};_pGrid._on_afterHideWaitComp=function(_a){if(this._currentCellEditor){this._currentCellEditor._setFocus(false);}};_pGrid.on_fire_user_onlbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){return this.on_fire_onlbuttonup(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,true,_n);};_pGrid.on_fire_sys_onlbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){return this.on_fire_onlbuttonup(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,false,_n);};_pGrid.on_fire_onlbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o){if(this._focus_proc){if(!this._showEditing){if(this._isCheckAlive(this._focus_proc.parent)){var _t=false;if(this._scrollpixel=="all"){_t=true;}this._focus_proc.parent._showfull(_t);this._focus_proc.parent._setFocus(false);}}else if(this._currentCellEditor.setCaretPos){if(this._currentCellEditor.autoselect){this._currentCellEditor.setSelect(0, -1);}else{this._currentCellEditor.setCaretPos(0);}}this._focus_proc=null;}var _p=_l;_p=this._findCellObj(_p);var _q;if(_p&&_p._type_name=="GridCell"){if(_p.parentcell){_q=_p;_p=_p.parentcell;}}var _r=this._recalcXY(_p,_g,_h,_o);_g=_r.canvasX;_h=_r.canvasY;_i=_r.clientX;_j=_r.clientY;var _s=false;if(this.onlbuttonup&&this.onlbuttonup._has_handlers){var _u=this._makeEventInfo(_p,_q,_l);var _v=this._getRootComponent(_l);var _w=_u.cell;var _x=_u.col;var _y=_u.mergecell;var _z=_u.mergecol;var _aa=_u.mergerow;var _ab=_u.pivotindex;var _ac=_u.row;var _ad=_u.subrow;var _ae=new nexacro.GridMouseEventInfo(_v,"onlbuttonup",_w,_x,_y,_z,_aa,_ab,_ac,_ad,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);if(_n){_s=this.onlbuttonup._fireUserEvent(this,_ae);}else{_s=this.onlbuttonup._fireSysEvent(this,_ae);}}if(!_n){if(_p&&_p._type_name=="GridCell"&&_p._band.id=="body"){if(this.selectchangetype=="up"){if(this.selecttype!="area"&&this.selecttype!="multiarea"){if(!this._is_drag_selecting){this._mouseSelection(_p,_c,_d,_g,_h,_k,_l);this._endExtraTrack();}}}}this._common_fire_sys_lbuttonup(_p,_b,_c,_d);this._resizerStart(_g,_h,_p,"up");}return _s;};_pGrid.on_fire_user_onrbuttonup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){var _m=_l;_m=this._findCellObj(_m);var _n;if(_m&&_m._type_name=="GridCell"){if(_m.parentcell){_n=_m;_m=_m.parentcell;}}var _o=this._recalcXY(_m,_g,_h,false);_g=_o.canvasX;_h=_o.canvasY;_i=_o.clientX;_j=_o.clientY;if(this.onrbuttonup&&this.onrbuttonup._has_handlers){var _p=this._makeEventInfo(_m,_n,_l);var _q=this._getRootComponent(_l);var _r=_p.cell;var _s=_p.col;var _t=_p.mergecell;var _u=_p.mergecol;var _v=_p.mergerow;var _w=_p.pivotindex;var _x=_p.row;var _y=_p.subrow;var _z=new nexacro.GridMouseEventInfo(_q,"onrbuttonup",_r,_s,_t,_u,_v,_w,_x,_y,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);return this.onrbuttonup._fireUserEvent(this,_z);}return false;};_pGrid.on_fire_user_onmouseup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){return this.on_fire_onmouseup(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,true);};_pGrid.on_fire_sys_onmouseup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){return this.on_fire_onmouseup(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,false);};_pGrid.on_fire_onmouseup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){var _n=_l;_n=this._findCellObj(_n);var _o;if(_n&&_n._type_name=="GridCell"){if(_n.parentcell){_o=_n;_n=_n.parentcell;}}var _p=this._recalcXY(_n,_g,_h,false);_g=_p.canvasX;_h=_p.canvasY;_i=_p.clientX;_j=_p.clientY;var _q=false;if(this.onmouseup&&this.onmouseup._has_handlers){var _r=this._makeEventInfo(_n,_o,_l);var _s=this._getRootComponent(_k);var _t=_r.cell;var _u=_r.col;var _v=_r.mergecell;var _w=_r.mergecol;var _x=_r.mergerow;var _y=_r.pivotindex;var _z=_r.row;var _aa=_r.subrow;var _ab=new nexacro.GridMouseEventInfo(_s,"onmouseup",_t,_u,_v,_w,_x,_y,_z,_aa,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);if(_m){_q=this.onmouseup._fireUserEvent(this,_ab);}else{_q=this.onmouseup._fireSysEvent(this,_ab);}}if(!_m){if(_n&&_n._type_name=="GridCell"&&_n._band.id=="body"){if(this.selectchangetype=="up"){if(this.selecttype!="area"&&this.selecttype!="multiarea"){this._mouseSelection(_n,_c,_d,_g,_h,_k,_l);}}}this._common_fire_sys_lbuttonup(_n,_b,_c,_d);}return _q;};_pGrid._resizerStart=function(_a,_b,_c,_d){if(this._movingcell){return;}var _e=this._resizer_colctrl;var _f=this._resizer_rowctrl;if((_e&&_e._is_tracking)||(_f&&_f._is_tracking)){return;}var _g=_a;var _h=_b;var _i=_c._rowidx;var _j=_c._cellidx;if(_c._is_alive==false){if(_i== -1){_c=this._getCurrentHeadCell(_j,true);}else{_c=this._getCurrentBodyCell(_i,_j);}}if(!_c){return;}var _k=(_c._refobj)?_c._refobj._area:"";var _l=(_c._band)?_c._band.id:"";if(_k=="body"){_g+=this._getScrollLeft();}if(_l=="body"){if(!_c.parent._fixed){_h+=this._getScrollTop();}}var _m=false;if(_e&&!_e._is_tracking){var _n=nexacro._getCachedValueObj("col-resize");var _o=this._resizerColRange;var _p=_o.length;if(_p>0){_e._is_range=false;for(var _q=0;_q<_p;_q++ ){var _r=_o[_q];if(_g>=_r.left&&_g<=_r.right){if(_k!=_r.area){continue;}if(_h>=_r.top&&_h<=_r.bottom){this.a=_g;_e._is_range=true;_e._setIndex(_r.index);this._setGlobalCursor(_n,_c);_m=true;break;}}}}if(!_e._is_range&&!_e._is_tracking&&(!_f||!_f._is_tracking)){this._setGlobalCursor(null,_c);_m=false;}else if(_e._is_tracking){this._setGlobalCursor(_n,_c);_m=true;}}if(_m){return;}if(_f&&!_f._is_tracking){var _n=nexacro._getCachedValueObj("row-resize");var _o=this._resizerRowRange;var _p=_o.length;if(_p>0){_f._is_range=false;for(var _q=0;_q<_p;_q++ ){var _r=_o[_q];if(_h>=_r.top&&_h<=_r.bottom){if(_l!=_r.area){continue;}if(_g>=_r.left&&_g<=_r.right){_f._is_range=true;_f._setIndex(_r.index);this._setGlobalCursor(_n,_c);break;}}}}if(!_f._is_range&&!_f._is_tracking&&(!_e||!_e._is_tracking)){this._setGlobalCursor(null,_c);}else if(_f._is_tracking){this._setGlobalCursor(_n,_c);}}};_pGrid.on_fire_user_ontouchmove=function(_a,_b,_c,_d){var _e=_d;_e=this._findCellObj(_e);this._recalcTouchInfosXY(_e,_b,false);var _f;if(_e&&_e._type_name=="GridCell"){if(_e.parentcell){_f=_e;_e=_e.parentcell;}}var _g=false;if(this.ontouchmove&&this.ontouchmove._has_handlers){var _h=this._makeEventInfo(_e,_f,_d);var _i=_h.cell;var _j=_h.col;var _k=_h.mergecell;var _l=_h.mergecol;var _m=_h.mergerow;var _n=_h.pivotindex;var _o=_h.row;var _p=_h.subrow;var _q=new nexacro.TouchEventInfo(this,"ontouchmove",_a,_b,_c,_d);_g=this.ontouchmove._fireUserEvent(this,_q);}return _g;};_pGrid.on_fire_user_onmousemove=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){var _m=_l;_m=this._findCellObj(_m);var _n;if(_m&&_m._type_name=="GridCell"){if(_m.parentcell){_n=_m;_m=_m.parentcell;}}var _o=this._recalcXY(_m,_g,_h,false);_g=_o.canvasX;_h=_o.canvasY;_i=_o.clientX;_j=_o.clientY;var _p=false;if(this.onmousemove&&this.onmousemove._has_handlers){var _q=this._makeEventInfo(_m,_n,_l);var _r=this._getRootComponent(_l);var _s=_q.cell;var _t=_q.col;var _u=_q.mergecell;var _v=_q.mergecol;var _w=_q.mergerow;var _x=_q.pivotindex;var _y=_q.row;var _z=_q.subrow;var _aa=new nexacro.GridMouseEventInfo(_r,"onmousemove",_s,_t,_u,_v,_w,_x,_y,_z,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);_p=this.onmousemove._fireUserEvent(this,_aa);}if(!nexacro.isTouchInteraction){this._resizerStart(_g,_h,_m,"move");}return _p;};_pGrid._prevAreaCellObj=null;_pGrid._areaselectMove=function(_a,_b,_a,_c){if(this._is_drag_selectstart&&!this._showEditing){var _d=_b;_d=this._findCellObj(_d);var _e,_f;if(_d&&_d._type_name=="GridCell"){if(_d.parentcell){_e=_d;_d=_d.parentcell;}var _g=this._recalcXY(_d,_a,_c,false);_a=_g.canvasX;_c=_g.canvasY;clientX=_g.clientX;clientY=_g.clientY;if((this._prevAreaCellObj==_d)&&!this._fixed_row_scrolling){return;}_f=_d._refobj._area;var _h=this._getDataRow(_d._rowidx);if(_h==undefined){_h=0;}if(this._isFakeCell(_h)||_h<0){return true;}var _i=this._beforebodycellpos=this._selectinfo.curcell;var _j=this._beforebodycolpos=this._selectinfo.curcol;var _k=this._beforebodyrowpos=this._selectinfo.curdsrow;var _l=this._beforebodysubrowpos=this._selectinfo.cursubrow;var _m=this._beforepvt=this._selectinfo.curpvt;var _n=_d._cellidx;var _o=_d._refobj._col;var _p=_h;var _q=_d._refobj._row;var _r= -9;if(_e){_o+=_e._refobj._col;}if(this._fixed_rowcnt>0){var _s=this._fixed_startrow;var _t=this._fixed_endrow;var _u=this._selectinfo;if(_u.area.length>0){var _v=_u.area[_u.area.length-1];var _w=_v.begrow;var _x=_v.endrow;var _y=this.vscrollbar.pos;var _z=this._getScrollTop();var _aa="";if(_p<_k){_aa="up";}else if(_p>_k){_aa="down";}else{_aa="keep";}if(_aa=="up"){this._fixed_row_scrolling=true;if(_x>_p&&_p<=_t&&_x>_t){this.vscrollbar.set_pos(_y-1);}else{this._fixed_row_scrolling=false;}}else if(_aa=="down"){if(_w<=this._fixed_endrow&&_x<=this._fixed_endrow){this._fixed_row_scroll_zeroset=true;}else{this._fixed_row_scroll_zeroset=false;}if(this._fixed_row_scroll_zeroset&&_p&&(_p<=0||(_p<=this._fixed_endrow&&_x>this._fixed_endrow)||(_p>this._fixed_endrow&&_w<=this._fixed_endrow))){if(_y>0){this.vscrollbar.set_pos(0);this._fixed_row_scroll_zeroset=false;return;}}}else{if(_y==0){this._fixed_row_scrolling=false;}else if(this._fixed_row_scrolling){this.vscrollbar.set_pos(_y-1);}}}}if(this._fixed_rowcnt>0){var _s=this._fixed_startrow;var _t=this._fixed_endrow;var _u=this._selectinfo;if(_u.area.length>0){var _v=_u.area[_u.area.length-1];var _w=_v.begrow;var _x=_v.endrow;var _y=this.vscrollbar.pos;var _z=this._getScrollTop();var _aa="";if(_p<_k){_aa="up";}else if(_p>_k){_aa="down";}else{_aa="keep";}if(_aa=="up"){this._fixed_row_scrolling=true;if(_x>_p&&_p<=_t&&_x>_t){this.vscrollbar.set_pos(_y-1);}else{this._fixed_row_scrolling=false;}}else if(_aa=="down"){if(_w<=this._fixed_endrow&&_x<=this._fixed_endrow){this._fixed_row_scroll_zeroset=true;}else{this._fixed_row_scroll_zeroset=false;}if(this._fixed_row_scroll_zeroset&&_p&&(_p<=0||(_p<=this._fixed_endrow&&_x>this._fixed_endrow)||(_p>this._fixed_endrow&&_w<=this._fixed_endrow))){if(_y>0){this.vscrollbar.set_pos(0);this._fixed_row_scroll_zeroset=false;return;}}}else{if(_y==0){this._fixed_row_scrolling=false;}else if(this._fixed_row_scrolling){this.vscrollbar.set_pos(_y-1);}}}}while(true){if(this.selecttype=="multirow"&&_p==_k){break;}this._setSelectedInfo(_n,_o,_p,_q,_r);this._ChangeSelect(_n,_o,_p,_q,_r,false,_i,_j,_k,_l,_m,_d._band.id,"mousemove");break;}this._prevAreaCellObj=_d;}}};_pGrid._on_start_extratrack=function(_a,_b,_c,_d,_e){var _f=this._getScrollLeft();var _g=this._getScrollTop();this._track_point.x=_c;this._track_point.y=_d;this._track_point.w=0;this._track_point.h=0;this._track_point.cur_rect={l:0,t:0,w:0,h:0};this._track_start_info={};this._track_start_info.target=this._lastmouseentercell;this._track_start_info.cell_screenX=system.clientToScreenX(this._lastmouseentercell,0);this._track_start_info.cell_screenY=system.clientToScreenY(this._lastmouseentercell,0);this._track_start_info.start_screenX=_c;this._track_start_info.start_screenY=_d;this._track_start_info.scrollLeft=_f;this._track_start_info.scrollTop=_g;this._track_start_info._start_begarea=this._selectinfo.arearect.barea;this._track_start_info._start_endarea=this._selectinfo.arearect.earea;var _h=this._getSelectRect(false,true);var _i=this._getExtraTrackSelectRect(_c,_d,0,0,true);if(!_e){this._startAreaSizing(_i,_i.idx);}this._track_mode="areaselect";};_pGrid._on_move_extratrack=function(_a,_b,_c,_d,_e,_f,_g){var _h=this._getRootComponent(_a);if(_h!=this||_a&&(_h==this&&_a instanceof nexacro.GridCell&&(_a._band.id=="head"||_a._band.id=="summ"))||(_h==this&&_a instanceof nexacro.GridRow&&_a._band.id=="body")||(_h==this&&_a.id=="body")){var _i=this._getExtraTrackSelectRect(_f,_g,_d,_e,false);var _j=_i.idx;var _k=this._getTrackType(this._track_start_info,_i.l,_i.t,_i.w,_i.h,_j,false);var _l=this._selectinfo.area;if(this._fixed_rowcnt>0&&_l.length){var _m=_l[_l.length-1];var _n=_m.begrow;var _o=_m.endrow;var _p=this._selectinfo.ctrlpoint;var _q=_p.row;var _r=_p.col;var _s=this.currentstyle.border;var _t=(_s)?parseInt(_s.right_width,10):0;var _u=this._getHeadHeight();var _v=this._fixed_height;var _w=_u+_v+_t;var _x=this._fixed_startrow;var _y=this._fixed_endrow;var _z=_i.t;var _aa=_i.h;var _ab=this._getScrollTop();var _ac=this.vscrollbar;if(_n<=_y&&_o<=_y&&_ab>0&&(_z+_aa)>_w){_ac.set_pos(0);}else if(_n<=_y&&_o>=_y&&_ab>0&&(_z+_aa)<=_w){_ac.set_pos(_ac.pos-1);}else if(_p.row>_y&&_ab>0&&_z<=_w){_ac.set_pos(_ac.pos-1);}}this._applySelectorScroll(_k.type);this._applyAreaSizing(_i,_j);var _ad=this._getSelectRect(false,true);this._extratrack_typeinfo=_k;this._extratrack_rectinfo=_i;this._extratrack_idx=_j;var _ae=500;var _af=10;function getTimerInterval(_a){var _ag=_ae;var _ah=nexacro.System.clientToScreenX(_a,0);var _ai=nexacro.System.clientToScreenY(_a,0);var _aj=_ah+parseInt(_a._adjust_width);var _ak=_ai+parseInt(_a._adjust_height);var _al=(_f<_ah)?(_ah-_f):(_f-_aj);var _am=(_g<_ai)?(_ai-_g):(_g-_ak);if(_al>=0){_ag=_ag-(_al*10);return _ag>0?_ag:1;}if(_am>=0){_ag=_ag-(_am*10);return _ag>0?_ag:1;}return -1;}var _ag=getTimerInterval(this);if(_ag>0&&_ag<_af){_ag=_af;}if(_ag>0){if(!this._extratrack_timer){this._extratrack_timer={};this._extratrack_timer._handle=null;this._extratrack_timer._interval=_ag;this._extratrack_timer._handle=new nexacro.CallbackTimer(this,function(){this._applySelectorScroll(this._extratrack_idx,this._extratrack_typeinfo.type);this._applyAreaSizing(this._extratrack_rectinfo,this._extratrack_idx);var _ad=this._getSelectRect(false,true);},_ag);this._extratrack_timer._handle.start();}else{if(this._extratrack_timer&&this._extratrack_timer._interval!=_ag){if(_ag>0){this._extratrack_timer._interval=_ag;this._extratrack_timer._handle.setInterval(_ag);this._extratrack_timer._handle.start();}else{this._extratrack_timer._handle.stop();}}}}}else{if(this._extratrack_timer){this._extratrack_timer._handle.stop();}}};_pGrid._on_end_extratrack=function(_a,_b,_c){var _d=this._select_ctrl;this._track_start_info=null;this._track_idx= -1;this._track_mode="";if(this._extratrack_timer){this._extratrack_timer._handle.stop();this._extratrack_timer._handle=null;this._extratrack_timer=null;}var _e=this._getSelectRect(false,true);};_pGrid._endExtraTrack=function(){this._on_end_extratrack();nexacro._cur_extra_track_info=null;};_pGrid._trackingHScroll=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){var _j=[0,0];if(!this.hscrollbar){return _j;}var _k=this.hscrollbar;if(_a==0||_a==2){if(_d=="right"){if(_b<_g&&_b>_f){_k.set_pos(_i);}}else if(_d=="left"){if(_b>_f&&_b<_g){_k.set_pos(0);_j[1]=_h;}}}else{if(_e=="left"){if(_c>_f&&_c<_g){_k.set_pos(0);}}else if(_e=="right"){if(_c<_g&&_c>_f){_k.set_pos(_i);_j[0]=_h-_i;_j[1]=_i-_h;}}}return _j;};_pGrid._getTrackType=function(_a,_b,_c,_d,_e,_f,_g){var _h,_i,_j,_k;var _l=this;var _m=_l._curFormat;var _n=["",""];var _o=_l._selectinfo.ctrlpoint.area;var _p=_m.leftWidth;var _q=_l._client_width-_m.rightWidth;var _r=_m.leftWidth+_m.bodyWidth;var _s=_l._getScrollLeft();var _t=_l._getScollMaxLeft();var _u=_b+_d;var _v=_l._getHeadHeight();var _w=_l._fixed_height;var _x=_v+_w;if(_g){if(_o=="left"){_h=0;_i=_p;}else if(_o=="right"){_h=_q;_i=_l._client_width;}else{_h=_p;_i=(_r<_q)?_r:_q;}}else{var _y=this._trackingHScroll(_f,_b,_u,_p,_a._start_begarea,_a._start_endarea,_q,_s,_t);_b+=_y[0];_d+=_y[1];_u=_b+_d;if(_o=="left"){_h=0;if(_s==_t){_i=(_r<_l._client_width)?_r:_l._client_width;}else{_i=(_r<_q)?_r:_q;}}else if(_o=="right"){if(_s==0){_h=0;}else{_h=_p;}_i=_l._client_width;}else{if(_s==0){_h=0;}else{_h=_p;}if(_s==_t){_i=(_r<_l._client_width)?_r:_l._client_width;}else{_i=(_r<_q)?_r:_q;}}}_j=this._bodyBand._adjust_top;_k=this._bodyBand._getPosBottom();if(_f==0){if(_b<_h){_d-=(_h-_b);_b=_h;if(this._start_begarea!="left"){_n[0]="leftover0";}}else if(_b>_i||(_s<_t&&_b>_q)){_n[0]="rightover0";}if(_l._fixed_rowcnt>0){if(_c<(_w+_v)){_n[1]="topover0";}else if(_c>_k){_n[1]="bottomover0";}}else{if(_c<_j){_e-=(_j-_c);_c=_j;_n[1]="topover0";}else if(_c>_k){_n[1]="bottomover0";}}if(_d<=0){_b+=_d-1;}if(_e<=0){_c+=_e-1;}}else if(_f==1){var _z=_b+_d,_aa=_c+_e;if(_z<_h||(_s>0&&_z<_p)){_n[0]="leftover1";}else if(_z>_i){_d=_i-_b;if(this._start_endarea!="right"){_n[0]="rightover1";}}if(_aa<_j){_n[1]="topover1";}else if(_aa>_k){_e=_k-_c;_n[1]="bottomover1";}}else if(_f==2){var _aa=_c+_e;if(_b<_h){_d-=(_h-_b);_b=_h;if(this._start_begarea!="left"){_n[0]="leftover0";}}else if(_b>_i||(_s<_t&&_b>_q)){_n[0]="rightover0";}if(_aa<_j||_aa>_x){_n[1]="topover1";}else if(_aa>_k){_e=_k-_c;_n[1]="bottomover1";}}else if(_f==3){var _z=_b+_d;if(_z<_h||(_s>0&&_z<_p)){_n[0]="leftover1";}else if(_z>_i){_d=_i-_b;if(this._start_endarea!="right"){_n[0]="rightover1";}}if(_c<_j){_n[1]="topover1";}else if(_c>_k){_e=_k-_c;_n[1]="bottomover1";}}return {type:_n,adjust_l:_b,adjust_t:_c,adjust_w:_d,adjust_h:_e};};_pGrid._getExtraTrackSelectRect=function(_a,_b,_c,_d,_e){var _f=1;var _g=this._track_start_info;var _h=_g.start_screenX;var _i=_g.start_screenY;var _j=_g.cell_screenX;var _k=_g.cell_screenY;var _l=_g.scrollLeft;var _m=_g.scrollTop;var _n=_g.target.width;var _o=_g.target.height;var _p=_g.target._rowidx;var _q=_k-_i;var _r=_k-_i+_o;var _s=_h-_j;var _t=_j-_h+_n;var _u=this._getScrollLeft();var _v=this._getScrollTop();var _w=_u-_l;var _x=_v-_m;var _y=_x;var _z=system.clientToScreenX(this,0);var _aa=system.clientToScreenY(this,0);var _ab=true;if(this._fixed_rowcnt>0&&_p>=this._fixed_startrow&&_p<=this._fixed_endrow){_ab=false;}if(!_ab){_y=0;}if(_a<(_h-_w)&&_b<(_i-_y)){_f=0;}else if(_a>(_h-_w)&&_b>(_i-_y)){_f=1;}else if(_a<(_h-_w)&&_b>(_i-_y)){_f=2;}else if(_a>(_h-_w)&&_b<(_i-_y)){_f=3;}var _ac=_c;var _ad=_d;var _ae=new Array(2);var _af=this.currentstyle.border;var _ag=(_af)?parseInt(_af.left_width,10):0;var _ah=(_af)?parseInt(_af.right_width,10):0;var _ai=(_af)?parseInt(_af.right_width,10):0;var _aj=(_af)?parseInt(_af.right_width,10):0;var _ak,_al,_am,_an;if(_f==0){_ak=this._track_point.x-_z+_ac;_al=this._track_point.y-_aa+_ad;_am= -(_ac);_an= -(_ad)-(_ab?_x:0);}else if(_f==1){_ak=this._track_point.x-_z-_w;_al=this._track_point.y-_aa-(_ab?_x:0);_am=_ac+_w;_an=_ad+(_ab?_x:0);}else if(_f==2){_ak=this._track_point.x-_z+_ac;_al=this._track_point.y-_aa-(_ab?_x:0);_am= -(_ac)-_w;_an=_ad+(_ab?_x:0);}else if(_f==3){_ak=this._track_point.x-_z-_w;_al=this._track_point.y-_aa+_ad;_am=_ac+_w;_an= -(_ad)-(_ab?_x:0);}return {idx:_f,l:_ak,t:_al,w:_am,h:_an};};_pGrid.on_fire_sys_onmousemove=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){if(!this.enable){return true;}return this._areaselectMove(_g,_l,_g,_h);};_pGrid._setSelectedInfo=function(_a,_b,_c,_d,_e,_f){if(_a!==null){this._selectinfo.curcell=this.currentcell=_a;}if(_b!==null){this._selectinfo.curcol=this.currentcol=_b;}if(_c!==null){this._selectinfo.curdsrow=this._currentDSrow=_c;this._selectinfo.currow=this.currentrow=(_c<0)?_c:this._getTreeRowPosition(_c);}if(_d!==null){this._selectinfo.cursubrow=this.currentsubrow=_d;}if(_e!==null){this._selectinfo.curpvt=this.currentpivot=_e;}if(_f){this._selectinfo.areainfo=null;this._selectinfo.areainfo={srow:_f.srow,erow:_f.erow,scell:_f.scell,ecell:_f.ecell,scol:_f.scol,ecol:_f.ecol,ssubrow:_f.ssubrow,esubrow:_f.esubrow,spvt:_f.spvt,epvt:_f.epvt};}};_pGrid._is_drag_selecting=false;_pGrid._on_grid_lbuttondown=function(_a,_b,_c,_d,_e){if(!this._is_alive){return;}if(!this.enable){return true;}var _f=this._getDataRow(_a._rowidx);if(_f==undefined){_f=0;}if(this._isFakeCell(_f)||_f<0){return true;}var _g=this._beforebodycellpos=this._selectinfo.curcell;var _h=this._beforebodycolpos=this._selectinfo.curcol;var _i=this._beforebodyrowpos=this._selectinfo.curdsrow;var _j=this._beforebodysubrowpos=this._selectinfo.cursubrow;var _k=this._beforepvt=this._selectinfo.curpvt;var _l=_a._cellidx;var _m=_a._refobj._col;var _n=_f;var _o=_a._refobj._row;var _p= -9;var _q=_a.parentcell;this._prevAreaCellObj=_a;if(_q){_l=_q._cellidx;_m+=_q._refobj._col;this._prevAreaCellObj=_q;}if(!_e){this._setSelectedInfo(_l,_m,_n,_o,_p);}if(_c==true){if(this._isMultiSelect()){this._multiselect="ctrl";}else{this._multiselect="none";}}else if(_d==true){if(this._isMultiSelect()||this._isAreaSelect()){this._multiselect="shift";}else{this._multiselect="none";}}else{if(this._multiselect!="none"){this._selectClear=true;}this._multiselect="none";}if((this._isAreaSelect()||this._isMultiSelect())&&!nexacro.isTouchInteraction){this._is_drag_selectstart=true;}var _r=false;if(!_e){_r=this._ChangeSelect(_l,_m,_n,_o,_p,false,_g,_h,_i,_j,_k,_b,"lbuttondown");};if(!_r){this._is_drag_sameselect=true;}var _s=this._getWindow();if(!nexacro.isTouchInteraction&&(this._isAreaSelect()||this.selecttype=="multirow")){if(nexacro.Browser=="Runtime"){var _t=application.mainframe;var _u=system.clientToScreenX(_t,0)+_s._curWindowX;var _v=system.clientToScreenY(_t,0)+_s._curWindowY;nexacro._setExtraTrackInfo(_s,this,_s._curWindowX,_s._curWindowY,_u,_v,_d||_e);}else{nexacro._setExtraTrackInfo(_s,this,_s._curWindowX,_s._curWindowY,_s._cur_screen_pos.x,_s._cur_screen_pos.y,_d||_e);}}return _r;};_pGrid.on_fire_onselectchanged=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s){if(this.onselectchanged&&this.onselectchanged._has_handlers){var _t=new nexacro.GridSelectEventInfo(_a,"onselectchanged",_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s);return this.onselectchanged._fireEvent(this,_t);}return true;};_pGrid.on_fire_user_onkeyup=function(_a,_b,_c,_d,_e,_f){if(!this.enable){return true;}if(_d==false&&_c==false){if(_a!=nexacro.Event.KEY_SHIFT&&_a!=nexacro.Event.KEY_CTRL){this._multiselect="none";}}if(this._iskey_movetocell){this._moveCellAfterFocus();}this._iskey_movetocell=false;this._keydown_elem=null;var _g=nexacro.Component.prototype.on_fire_user_onkeyup.call(this,_a,_b,_c,_d,_e,_f);if(!this._is_alive){return ret;}if(_a==nexacro.Event.KEY_RIGHT&&_b){var _h=this._curFormat;if(_h){var _i=_h._bodycells;if(_i&&_i.length){var _j=this._getBodyCellInfo(this._selectinfo.curcell);if(_j){var _k=_j._getAttrValue(_j.expandshow,this._selectinfo.curdsrow);if(_k=="show"){if(this.onkeyup&&this.onkeyup.defaultprevented==true){}else{this.on_fire_onexpandup("none",_b,_c,_d, -1, -1, -1, -1, -1, -1,_e,_f);}}}}}}return _g;};_pGrid.on_fire_sys_onkeydown=function(_a,_b,_c,_d,_e,_f){if(this._is_down_act){this._on_last_keyup(true);}};_pGrid.on_fire_user_onkeydown=function(_a,_b,_c,_d,_e,_f){var _g=nexacro.AccessibilityUtil.checkComponentHotkey(this,_a,_b,_c,_d);if(_g){this._hideEditor();var _m=this.currentrow;switch(_g){case nexacro.AccessibilityUtil.Hotkey.FIRSTCELL:this.currentcell=0;this._currentBand="grid";if(this.vscrollbar&&this.vscrollbar.visible){this.vscrollbar.set_pos(0);}this._setAccessibilityBandFocus("next",false,true);break;case nexacro.AccessibilityUtil.Hotkey.LASTCELL:this.currentcell=this._getAccessibilityCellIndex()-1;this._currentBand="grid";if(this.vscrollbar&&this.vscrollbar.visible){this.vscrollbar.set_pos(this.vscrollbar._max);}this._setAccessibilityBandFocus("prev",false,true);break;case nexacro.AccessibilityUtil.Hotkey.FIRSTCELLINROW:this.currentcol=0;this._moveToPosAccessibilityCell(_m,0);break;case nexacro.AccessibilityUtil.Hotkey.LASTCELLINROW:this.currentcol=this._curFormat._cols.length-1;this._moveToPosAccessibilityCell(_m,this.currentcol);break;case nexacro.AccessibilityUtil.Hotkey.FIRSTCELLINCOLUMN:this._currentBand="grid";if(this.vscrollbar&&this.vscrollbar.visible){this.vscrollbar.set_pos(0);}this._setAccessibilityBandFocus("next",false,true);break;case nexacro.AccessibilityUtil.Hotkey.LASTCELLINCOLUMN:this._currentBand="grid";if(this.vscrollbar&&this.vscrollbar.visible){this.vscrollbar.set_pos(this.vscrollbar._max);}this._setAccessibilityBandFocus("prev",false,true);break;}return true;}if(!this.enable){return true;}var _h=nexacro.Component.prototype.on_fire_user_onkeydown.call(this,_a,_b,_c,_d,_e,_f);if((this.onkeydown&&this.onkeydown.defaultprevented==true)||!this._is_alive){return _h;}this._keydown_elem=this._getWindow()._keydown_element;var _i=false;if(this._isAreaSelect()){_i=true;}if(_d==true){if(_a==nexacro.Event.KEY_SHIFT){return _h;}if(this._isMultiSelect()||this._isAreaSelect()){this._multiselect="shift";}else{this._multiselect="none";}}else if(_c==true){if(_a==nexacro.Event.KEY_CTRL){return _h;}if(this._multiselect!="none"){this._selectClear=true;}this._multiselect="none";}else{if(this._multiselect!="none"){this._selectClear=true;}this._multiselect="none";}var _j=false;if(this._isChar(_a)&&this.autoenter=="key"){if(nexacro.Browser=="Runtime"){if(!this._showEditing){this._showEditor();if(this._currentCellEditor&&this._currentCellEditor._set_absolutelyValue){this._currentCellEditor._set_absolutelyValue("");}if(_a==nexacro.Event.KEY_ENTER){_j=true;}}}}if(_a==nexacro.Event.KEY_ENTER&&this._showEditing){var _n=this._currentCellEditor;var _o=_n._cellinfo._getEdittype(_n._cellobj._rowidx);if(_o=="text"||_o=="mask"||_o=="date"||_o=="combo"||_o=="masknumber"){if(_n.calendaredit){_n.calendaredit._edit_base_api.syncValue();}else if(_n.comboedit){_n.comboedit._edit_base_api.syncValue();}else{_n._edit_base_api.syncValue();}_j=true;_n._setDataset();}}var _k=_f;var _l="";if(_a==nexacro.Event.KEY_UP){if(this._isEditorKeyAction(this._keydown_elem,_f,_a,_b,_c,_d)==false){if(_c){if(this.vscrollbar&&this.vscrollbar.enable){var _p;if(this._scrollpixel=="all"){_p=this.vscrollbar.pos-25;}else{_p=this.vscrollbar.pos-1;}if(_p<0){_p=0;}this.vscrollbar.set_pos(_p);}}else{if(nexacro._enableaccessibility){_h=this._moveToAccessibilityCell("up",false);}else{this._moveToCell("up");}}}}else if(_a==nexacro.Event.KEY_DOWN){if(this._isEditorKeyAction(this._keydown_elem,_f,_a,_b,_c,_d)==false){if(_c){var _p;if(this._scrollpixel=="all"){_p=this.vscrollbar.pos+25;}else{_p=this.vscrollbar.pos+1;}if(_p>this.vscrollbar.max){_p=this.vscrollbar.max;}this.vscrollbar.set_pos(_p);}else{if(nexacro._enableaccessibility){_h=this._moveToAccessibilityCell("down",false);}else{this._moveToCell("down");}}}}else if(_a==nexacro.Event.KEY_SPACE){if(!nexacro._enableaccessibility||nexacro._enableaccessibility&&this._currentBand=="body"){var _q=this._curFormat;if(_q){var _r=_q._bodycells;if(_r&&_r.length){var _s=_r[this._selectinfo.curcell];if(_s){var _t=_s._getEdittype(this._selectinfo.curdsrow);if(_t=="checkbox"&&nexacro._toBoolean(this.readonly)==false){if(this._toggleVal(this._selectinfo.curdsrow,_s)){this._jumpCurrentRow(this._selectinfo.currow);}}}}}}}else if(_a==nexacro.Event.KEY_ENTER){if(!nexacro._enableaccessibility||nexacro._enableaccessibility&&this._currentBand=="body"){if(this.autoenter!="select"){var _t="";if(_f._type_name=="GridCell"){_t=_f._refobj._getEdittype(_f._rowidx);_l=_f._refobj._getValue(_f._rowidx);}else if(_f instanceof nexacro.GridControlCheckbox){_l=_f._cellinfo._getValue(_f._cellobj._rowidx);}else if(_f.parent instanceof nexacro.GridControlCheckbox){_l=_f.parent._cellinfo._getValue(_f.parent._cellobj._rowidx);}if(_f instanceof nexacro.GridControlEdit||_f instanceof nexacro.GridControlTextArea||_f instanceof nexacro.GridControlMaskEdit||_f instanceof nexacro.GridControlCheckbox||_f.parent instanceof nexacro.GridControlCheckbox||_t=="checkbox"||_f instanceof nexacro.GridControlCalendar||_f.parent instanceof nexacro.GridControlCalendar||_f instanceof nexacro.GridControlCombo||_f.parent instanceof nexacro.GridControlCombo){if(nexacro.Browser=="IE"){if(_f instanceof nexacro.GridControlCombo){_k=_f.comboedit;}}if(this._showEditing||_t=="checkbox"){_j=true;}else{this._showEditor();}}else{if(!this._showEditing){this._showEditor();}}}}}else if(_a==nexacro.Event.KEY_LEFT){var _q=this._curFormat;if(_q){var _r=_q._bodycells;if(_r&&_r.length){var _s=this._getBodyCellInfo(this._selectinfo.curcell);if(_s){var _t=_s._getEdittype(this._selectinfo.curdsrow);if(_t=="tree"&&this.treeuseexpandkey){this._is_editor_keyaction=false;this._setTreeState(this._selectinfo.currow,0,true);}else if(_t=="combo"&&_s._getAttrValue(_s.combotype,this._getDataRow(this._selectinfo.curdsrow))=="dropdown"){this._is_editor_keyaction=false;if(nexacro._enableaccessibility){_h=this._moveToAccessibilityCell("prev",false,undefined,_i);}else{this._moveToCell("prev",false,_i,undefined,undefined,true);}}}}if(this._isEditorKeyAction(this._keydown_elem,_f,_a,_b,_c,_d)==false){if(nexacro._enableaccessibility){_h=this._moveToAccessibilityCell("prev",false,undefined,_i);}else{this._moveToCell("prev",false,_i,undefined,undefined,true);}}}}else if(_a==nexacro.Event.KEY_RIGHT){var _q=this._curFormat;if(_q){var _r=_q._bodycells;if(_r&&_r.length){var _s=this._getBodyCellInfo(this._selectinfo.curcell);if(_s){var _t=_s._getEdittype(this._selectinfo.curdsrow);if(_t=="tree"&&this.treeuseexpandkey){this._is_editor_keyaction=false;this._setTreeState(this._selectinfo.currow,1,true);}else if(_t=="combo"&&_s._getAttrValue(_s.combotype,this._getDataRow(this._selectinfo.curdsrow))=="dropdown"){this._is_editor_keyaction=false;if(nexacro._enableaccessibility){_h=this._moveToAccessibilityCell("next",false,undefined,_i);}else{this._moveToCell("next",false,_i,undefined,undefined,true);}}else{var _u=_s._getAttrValue(_s.expandshow,this._selectinfo.curdsrow);if(_u=="show"&&_b){this._is_editor_keyaction=false;this.on_fire_onexpanddown("none",_b,_c,_d, -1, -1, -1, -1, -1, -1,_e,_f);}}}}if(this._isEditorKeyAction(this._keydown_elem,_f,_a,_b,_c,_d)==false){if(nexacro._enableaccessibility){_h=this._moveToAccessibilityCell("next",false,undefined,_i);}else{this._moveToCell("next",false,_i,undefined,undefined,true);}}}}else if(_a==nexacro.Event.KEY_PAGE_UP){if(this.vscrollbar&&this.vscrollbar.enable){var _p=this.vscrollbar._pos-this.vscrollbar.page;if(this._scrollpixel!="all"){_p=this.vscrollbar._scroll_reverse_convert(_p)[0];}if(_p<0){_p=0;}this.vscrollbar.set_pos(_p);}}else if(_a==nexacro.Event.KEY_PAGE_DOWN){if(this.vscrollbar&&this.vscrollbar.enable){var _p=this.vscrollbar._pos+this.vscrollbar.page;if(this._scrollpixel!="all"){_p=this.vscrollbar._scroll_reverse_convert(_p)[0];}if(_p>this.vscrollbar.max){_p=this.vscrollbar.max;}this.vscrollbar.set_pos(_p);}}else if(_a==nexacro.Event.KEY_TAB){this._keydown_elem._event_stop=true;if(nexacro._enableaccessibility){if(_d){this._acceptstab=this._moveToAccessibilityCell("prev",true);}else{this._acceptstab=this._moveToAccessibilityCell("next",true);}}else{if(_d==true){this._acceptstab=this._moveToCell("prev",true,false,undefined,undefined,true);}else{this._acceptstab=this._moveToCell("next",true,false,undefined,undefined,true);}}if(this._acceptstab&&this._iskey_movetocell){this._moveCellAfterFocus();this._iskey_movetocell=false;}return this._acceptstab;}else{if(this._isChar(_a)&&this.autoenter=="key"){if(nexacro.Browser=="Runtime"){if(!this._showEditing){this._showEditor();if(nexacro.Browser=="Gecko"){if(_j){this.on_fire_onenterdown(_a,_b,_c,_d,_e,_k,_l);}return true;}else if(nexacro.Browser=="IE"){}}}}}if(_j){this.on_fire_onenterdown(_a,_b,_c,_d,_e,_k,_l);}return _h;};_pGrid.on_fire_allclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t,_u,_v,_w,_x){if((this.onlbuttondown&&this.onlbuttondown.defaultprevented==true)||(this.onlbuttonup&&this.onlbuttonup.defaultprevented==true)){return;}if(this._down_scroll_top>=0&&this._down_scroll_top!=this._last_scroll_top){return;}var _y=this[_b];if(_y&&_y._has_handlers&&this.enableevent){var _z=new nexacro.GridClickEventInfo(_a,_b,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t,_u,_v,_w);_z.clickitem=_c;return _y._fireEvent(this,_z);}return true;};_pGrid._getByteLength_UTF8=function(_a,_b,_c,_d){for(_b=_c=0;_d=_a.charCodeAt(_c++ );_b+=_d>>11?3:_d>>7?2:1){}return _b;};_pGrid.on_fire_cellclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){if(!this._is_alive){return;}if(!this.enable){return true;}var _o=this._getDataRow(_a._rowidx);if(this._isFakeCell(_o)){return true;}var _p;if(_a.parentcell){_p=_a;_a=_a.parentcell;}var _q=this._recalcXY(_a,_i,_j,true);_i=_q.canvasX;_j=_q.canvasY;_k=_q.clientX;_l=_q.clientY;if(nexacro.isTouchInteraction){if(_a._band.id=="body"){if(!(this._selectscrollmode=="select"&&this._isAreaSelect())){this._common_fire_sys_lbuttondown(_a,_e,_f,_i,_j,_m,_n);}}}var _r=this._beforebodycellpos;var _s=this._beforebodycolpos;var _t=this._beforebodyrowpos;var _u=this._beforebodysubrowpos;var _v=this._beforepvt;var _w=_a._cellidx;var _x=_a._refobj._col;var _y=_o;var _z=_a._refobj._row;var _aa= -9;var _ab=_a.parentcell;if(_p){_x+=_p._refobj._col;}var _ac=_n;var _ad=false;while(_ac&&_ac._type_name!="Grid"){if(_ac._displaymode==false&&!_ac._clickevt_able){_ad=true;}_ac=_ac.parent;}if(!_ad){this.on_fire_allclick(this,"oncellclick",_b,_r,_s,_t,_u,_v,_w,_x,_y,_z,_aa,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_n);}};_pGrid.on_fire_headclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){if(!this.enable||!this._is_alive){return true;}var _o;if(_a.parentcell){_o=_a;_a=_a.parentcell;}var _p=this._recalcXY(_a,_i,_j,true);_i=_p.canvasX;_j=_p.canvasY;_k=_p.clientX;_l=_p.clientY;var _q=this._beforeheadcellpos;var _r=this._beforeheadcolpos;var _s=this._beforeheadrowpos;var _t=this._beforeheadsubrowpos;var _u=this._beforepvt;var _v=this._beforeheadcellpos=_a._cellidx;var _w=this._beforeheadcolpos=_a._refobj._col;var _x=this._beforeheadrowpos=this._getDataRow(_a._rowidx);var _y=this._beforeheadsubrowpos=_a._refobj._row;var _z= -9;this.on_fire_allclick(this,"onheadclick",_b,_q,_r,_s,_t,_u,_v,_w,_x,_y,_z,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_n);};_pGrid.on_fire_summclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){if(!this.enable||!this._is_alive){return true;}var _o;if(_a.parentcell){_o=_a;_a=_a.parentcell;}var _p=this._recalcXY(_a,_i,_j,true);_i=_p.canvasX;_j=_p.canvasY;_k=_p.clientX;_l=_p.clientY;var _q=this._beforesummcellpos;var _r=this._beforesummcolpos;var _s=this._beforesummrowpos;var _t=this._beforesummsubrowpos;var _u=this._beforepvt;var _v=this._beforesummcellpos=_a._cellidx;var _w=this._beforesummcolpos=_a._refobj._col;var _x=this._beforesummrowpos=this._getDataRow(_a._rowidx);var _y=this._beforesummsubrowpos=_a._refobj._row;var _z= -9;this.on_fire_allclick(this,"onsummclick",_b,_q,_r,_s,_t,_u,_v,_w,_x,_y,_z,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_n);};_pGrid.on_fire_celldblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){if(!this.enable||!this._is_alive){return true;}var _o=this._getDataRow(_a._rowidx);if(this._isFakeCell(_o)){return true;}var _p;if(_a.parentcell){_p=_a;_a=_a.parentcell;}var _q=this._recalcXY(_a,_i,_j,true);_i=_q.canvasX;_j=_q.canvasY;_k=_q.clientX;_l=_q.clientY;var _r=this._dbclickPreCell;var _s=this._dbclickPreCol;var _t=this._dbclickPreRow;var _u=this._dbclickPreSubrow;var _v=this._dbclickPrePvt;var _w=_a._cellidx;var _x=_a._refobj._col;var _y=_o;var _z=_a._refobj._row;var _aa= -9;if(_p){_x+=_p._refobj._col;}this._dbclickPreCell=_w;this._dbclickPreCol=_x;this._dbclickPreRow=_y;this._dbclickPreSubrow=_z;this._dbclickPrePvt=_aa;this.on_fire_allclick(this,"oncelldblclick",_b,_r,_s,_t,_u,_v,_w,_x,_y,_z,_aa,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_n);};_pGrid.on_fire_headdblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){if(!this.enable||!this._is_alive){return true;}var _o;if(_a.parentcell){_o=_a;_a=_a.parentcell;}var _p=this._recalcXY(_a,_i,_j,true);_i=_p.canvasX;_j=_p.canvasY;_k=_p.clientX;_l=_p.clientY;var _q=this._dbclickPreCell;var _r=this._dbclickPreCol;var _s=this._dbclickPreRow;var _t=this._dbclickPreSubrow;var _u=this._dbclickPrePvt;var _v=_a._cellidx;var _w=_a._refobj._col;var _x=this._getDataRow(_a._rowidx);var _y=_a._refobj._row;var _z= -9;this._dbclickPreCell=_v;this._dbclickPreCol=_w;this._dbclickPreRow=_x;this._dbclickPreSubrow=_y;this._dbclickPrePvt=_z;this.on_fire_allclick(this,"onheaddblclick",_b,_q,_r,_s,_t,_u,_v,_w,_x,_y,_z,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_n);};_pGrid.on_fire_summdblclick=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){if(!this.enable||!this._is_alive){return true;}var _o;if(_a.parentcell){_o=_a;_a=_a.parentcell;}var _p=this._recalcXY(_a,_i,_j,true);_i=_p.canvasX;_j=_p.canvasY;_k=_p.clientX;_l=_p.clientY;var _q=this._dbclickPreCell;var _r=this._dbclickPreCol;var _s=this._dbclickPreRow;var _t=this._dbclickPreSubrow;var _u=this._dbclickPrePvt;var _v=_a._cellidx;var _w=_a._refobj._col;var _x=this._getDataRow(_a._rowidx);var _y=_a._refobj._row;var _z= -9;this._dbclickPreCell=_v;this._dbclickPreCol=_w;this._dbclickPreRow=_x;this._dbclickPreSubrow=_y;this._dbclickPrePvt=_z;this.on_fire_allclick(this,"onsummdblclick",_b,_q,_r,_s,_t,_u,_v,_w,_x,_y,_z,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_n);};_pGrid.on_dsnotify_onrowposchanged=function(_a,_b){var _c=this._rowposition;var _d=parseInt(_a.rowposition,10);this._rowposition=_d;if(this.getElement()&&this._userRowposChange==false){var _e= -1;var _f= -1;if(this._hasTree){_e=this._getTreeRowPosition(_c);_f=this._getTreeRowPosition(_d);}else{_e=_c;_f=_d;}var _g;var _h;var _i;var _j;var _k;var _l;var _m;var _n;var _o;var _p= -9;_g=this._beforebodycellpos=this._selectinfo.curcell;_h=this._beforebodycolpos=this._selectinfo.curcol;_i=this._beforebodyrowpos=this._selectinfo.curdsrow;_j=this._beforebodysubrowpos=this._selectinfo.cursubrow;_k=this._beforepvt=this._selectinfo.curpvt;if(_e==_f){}else if(_f<0){_l=(this._selectinfo.curcell<0)?0:this._selectinfo.curcell;_m=(this._selectinfo.curcol<0)?0:this._selectinfo.curcol;_n=_d;_o=(this._selectinfo.cursubrow<0)?0:this._selectinfo.cursubrow;this._hideEditor();this._setSelectedInfo(_l,_m,_n,_o,_p);this._ChangeSelect(_l,_m,_n,_o,_p,true,_g,_h,_i,_j,_k,"body");}else{_l=(this._selectinfo.curcell<0)?0:this._selectinfo.curcell;_m=(this._selectinfo.curcol<0)?0:this._selectinfo.curcol;_n=_d;_o=(this._selectinfo.cursubrow<0)?0:this._selectinfo.cursubrow;this._setSelectedInfo(_l,_m,_n,_o,_p);if(_n>=0&&(this._isMultiSelect()||this._isAreaSelect())){if(_a._bWorkingstatus==true){this._beforebodycellpos= -1;this._beforebodycolpos= -1;this._beforebodyrowpos= -1;this._beforebodysubrowpos= -1;this._setSelectedInfo( -1, -1, -1, -1,null);this._hideEditor();this._ChangeSelect( -1, -1, -1, -1,_p,true,_g,_h,_i,_j,_k,"body");}else{var _q=this._dsRowToDispRow(_n);this._jumpCurrentRow(_q);}}else{this._hideEditor();this._ChangeSelect(_l,_m,_n,_o,_p,true,_g,_h,_i,_j,_k,"body");}}this._moveCellAfterFocus();}};_pGrid.on_dsnotify_oncolumnchanged=function(_a,_b){if(_a._bWorkingstatus==true){this._recreate_contents_all(true,true,false);return;}var _c=false;var _d=[];if(this._isTreeStateChanged(_b,this._dsEventOccured)==true){_c=true;this._updateTreeStates();var _e=this._getTreeRowPosition(_b.row);var _f=this._treeStates[_b.row];if(this._bodyBand){if(_e== -1){this._recreate_contents_all(true,true,false,true);}else{if(_f==0){this._bodyBand._matrix._adjustTreeDisplay(_e,true);}else{this._bodyBand._matrix._adjustTreeDisplay(_e,false);}var _g=this.getTreeParentRow(_e,true);_g=this._dsRowToDispRow(_g,true);this._refreshBodyRow(_g);}}}else if((this.autosizingtype=="row"||this.autosizingtype=="both")&&this._isChangeBodyRowSizeList(_b.row)==true){this._recreate_contents_all(true,true,false);}else if((this.autosizingtype=="col"||this.autosizingtype=="both")&&this._isChangeBodyColSizeList(_b.columnid,_d)==true){if(_d.length>1){if(this.autosizingtype=="both"){this._recreate_contents_all(true,true,false);}else{this._recreate_contents_all(true,false,false);}}else if(_d.length==1){this._updateColSize(_d[0]);}}else{if(_b.row>=0){if(this._hasTree&&this._treeCellinfo.treecheck._bindexpr==_b.columnid){this._treeChecked=this._createTreeChecked();}var _h=this._dsRowToDispRow(_b.row,true);if(_h>=0){var _i=this._getBindTextCellInfo(_b.columnid);if(_i){var _j=_i[0];var _k=_i[1];var _l=false;var _m=false;var _n=_j.length,_o;for(var _p=0;_p<_n;_p++ ){_o=_j[_p]._getSuppress(_b.row);if(_o!=0){this._suppressUpdate();break;}}var _q=false;for(var _p=0;_p<_n;_p++ ){if(_j[_p].celltype=="head"){_l=true;}else if(_j[_p].celltype=="summary"){_m=true;}else{if(_b.col== -1&&_b.colidx== -1){if(_b.newvalue!=undefined){if(!_q){if(this._hasTree){this._initTreeStates();this._refreshBody();}else{this._refreshBodyRow(_h);}_q=true;}}}else{if(this._hasTree&&_c){if(!_q){this._refreshBody();_q=true;}}else{_o=_j[_p]._getSuppress(_b.row);if(_o>0){this._refreshCell("body",_j[_p]._cellidx);}else if(_o<0){if(!_q){this._refreshBodyRow(_h);_q=true;}}else{if(!_q){var _r=this._binddataset;if(_r.keystring&&_r._keycols.length>0){this._refreshBody();}else{this._refreshBodyRow(_h);}_q=true;}if(_k&&this._currentCellEditor&&_j[_p]._col==this._currentCellEditor._cellinfo._col&&_j[_p]._row==this._currentCellEditor._cellinfo._row&&_b.row==this._currentCellRow){this._currentCellEditor._setProperty();}}}}_m=true;}}}if(_l){this._refreshHead();}if(_m){this._refreshSumm();}}}else{this._refreshHead();this._refreshSumm();if(_a._isConstColumn(_b.col)==true){this._refreshBody();}}}};_pGrid.on_dsnotify_onload=function(_a,_b){if(!this._is_created&&this._rowcount==_a.rowcount){return;}this.rowcount=this._rowcount=_a.rowcount;this._rowposition=_a.rowposition;this._exprcache={};this._clearAllStyleCache();this._initTreeStates();var _c=_b.reason;if(_c==0||_c==1||_c==3||_c==2){if(this._async_create==true){this._recreate_contents_all_async(true,true,true);}else{this._recreate_contents_all(true,true,true);}}};_pGrid.on_dsnotify_onrowsetchanged=function(_a,_b){var _c=this._binddataset;var _d=(this._rowcount!=_c.rowcount);var _e=this._rowcount;this.rowcount=this._rowcount=_c.rowcount;var _f=false;if(this._rowposition!=_c.rowposition){_f=true;}this._rowposition=_c.rowposition;if(this._curFormat){var _g=this._curFormat._bodycells;var _h=this._rowcount-1;var _i;switch(_b.reason){case 10:_i="assign";break;case 11:_i="copydata";break;case 12:if(_b.row== -1){_i="appenddata";}else if(_b.row==_h){_i="addrow";}else if(_b.row<_h){_i="insertrow";}break;case 20:if(_b.row== -1){_i="deletemultirows";}else{_i="deleterow";}break;case 22:_i="deleteall";break;case 23:_i="cleardata";break;case 30:_i="keystring";break;case 31:if(_b.row== -1){_i="filter";}else{_i="filterrow";}break;case 32:_i="moverow";break;case 33:_i="exchangerow";break;case 34:_i="addcolumn";break;case 41:_i="enableevent";break;case 40:_i="rowtype";break;default:break;}if(_i=="copydata"||_i=="addcolumn"||_i=="assign"){this._exprcache={};this._resetSelect(this._rowposition);}else if(_i=="enableevent"||_i=="appenddata"){this._exprcache={};}else if(_i=="deleterow"||_i=="filterrow"){this._delSelectpos( -1,_b.row,true);if(_g&&this._isMultiSelect()==false&&this._isAreaSelect()==false){if(this._isSelectRowType()){for(var _j=0;_j<_g.length;_j++ ){this._addSelectpos(_j,this._rowposition);}}else{this._addSelectpos(0,this._rowposition);}}this._resetSelectStartEndRow();this._updateTreeStates(_b.row,false);}else if(_i=="deletemultirows"){var _k=_a._deleteRows;this._delSelectpos( -1,_k,true);if(_g&&this._isMultiSelect()==false&&this._isAreaSelect()==false){if(this._isSelectRowType()){for(var _j=0;_j<_g.length;_j++ ){this._addSelectpos(_j,this._rowposition);}}else{this._addSelectpos(0,this._rowposition);}}this._resetSelectStartEndRow();for(var _j=_k.length-1;_j>=0;_j-- ){this._updateTreeStates(_k[_j],false);}}else if(_i=="deleteall"||_i=="cleardata"||_i=="filter"){this._clrMultiSelect();this._setSelectedInfo( -1, -1, -1, -1,null);this._destroyOverlayElements();}else if(_i=="copydata"){this._setSelectedInfo(null,null,this._rowposition,0,null);}else if(_i=="addrow"||_i=="insertrow"||_i=="appendrow"){this._updateTreeStates(_b.row,true);}if(this._is_async_recreate){nexacro.OnceCallbackTimer.callonce(this,function(){this._afterRowsetChanged(_i,_f,_b.row,_d,_e);this._is_async_recreate=false;},10);}else{this._afterRowsetChanged(_i,_f,_b.row,_d,_e);}}};_pGrid._afterRowsetChanged=function(_a,_b,_c,_d,_e){if(!this.enableredraw){this._enable_redraw_history["recreate"]=true;return;}if(this.getElement()){if(_a=="moverow"||_a=="enableevent"){this._hideEditor(false,true);}else{this._hideEditor(false,false);}if(_a=="copydata"||_a=="assign"){this._initTreeStates();this._recreate_contents_all(true,true,true);}else if(_a=="addcolumn"){this._initTreeStates(true);this._recreate_contents_all(true,true,false);}else if(_a=="keystring"){this._initTreeStates();this._recreate_contents_all(true,true,false,true);this._resetSelect(this._rowposition,this._selectinfo.curcell,this._selectinfo.curcol,this._selectinfo.cursubrow,this._selectinfo.curpvt);}else if(_a=="enableevent"){this._initTreeStates(true);if(_d||this.autosizingtype!="none"){this._recreate_contents_all(true,true,false);}else{if(this._hasTree){this._bodyBand._matrix._adjustRowsDisplay(true);this._bodyBand._matrix._adjustColsDisplay();this._bodyBand._on_refresh_rows();}this._refreshAll();}if(_b==false){this._select_noscroll=true;}this._resetSelect(this._rowposition,this._selectinfo.curcell,this._selectinfo.curcol,this._selectinfo.cursubrow,this._selectinfo.curpvt);this._select_noscroll=false;if(!this._is_created){this._create_selection={cell:this._selectinfo.curcell,col:this._selectinfo.curcol,row:this._selectinfo.curdsrow,subrow:this._selectinfo.cursubrow,pvt:this._selectinfo.curpvt};}}else if(_a=="addrow"||_a=="appenddata"||_a=="deleterow"||_a=="filterrow"||_a=="insertrow"||_a=="deletemultirows"||_a=="filter"){var _f=this._bodyBand;var _g=this._getDataRow(this._endrowpos);var _h=_f._matrix._getBodyRowTopPos(_g+1)-this._getScrollTop();var _i=this._getAvailableRect(_f);var _j;if(_a=="addrow"||_a=="appenddata"){_j=_e;}if(_h>=_i.height&&_g<_c){if(this._isUserChangeHeadRowSize||this._isUserChangeBodyRowSize||this._isUserChangeSummRowSize){this._recreate_contents_all(true,true,false,true,undefined,_j);}else{this._resetRowSizeList(_j);this._resetColSizeList(_j);this._resetScrollMax();}}else{if(_a=="insertrow"){if(this.autosizingtype!="none"||this._hasTree){this._recreate_contents_all(true,true,false,true,undefined,_j);}else{this._updateBodyClient(_a,_c,_j);}}else{if(this._hasTree){this._initTreeStates();this._recreate_contents_all(true,true,false,true,undefined,_j);}else if(this.autosizingtype=="col"||this.autosizingtype=="both"){this._recreate_contents_all(true,true,false,undefined,undefined,_j);}else{this._updateBodyClient(_a,_c,_j);if(this._isUseBindExprStyle("head")||this._getUseBindExprProp("head")){this._refreshHead(true);}if(this._isUseBindExprStyle("summ")||this._getUseBindExprProp("summ")){this._refreshSumm(true);}}}}}else if(_a=="exchangerow"||_a=="moverow"){if(this.autosizingtype!="none"||this._hasTree){this._recreate_contents_all(true,false,false,true);}else{this._refreshBody();}}else if(_a=="rowtype"){this._refreshAll();}else{this._initTreeStates();this._recreate_contents_all(true,true,false);}this._moveCellAfterFocus();}};_pGrid._getDisplayRowCount=function(){var _a=this._bodyBand;if(_a){return _a._get_rows().length;}return 0;};_pGrid._updateBodyClient=function(_a,_b,_c){this._resetRowSizeList(_c);this._resetColSizeList(_c);var _d=this._bodyBand;this._resetScrollMax();this._applyAutofittype(true);var _e=this._getDisplayRowCount();if(_a=="insertrow"){_d._matrix._adjustRowsDisplay();_d._matrix._adjustColsDisplay();var _g=_d._matrix._rows;var _h=_g.length;for(var _i=0;_i<_h;_i++ ){var _j=this._getDataRow(_g[_i]._rowidx);if(_b>_j){continue;}_d._update_rows.push(_g[_i]);}_d._on_refresh_rows();var _k=this._dsRowToDispRow(_b);this._jumpCurrentRow(_k);}else{var _l=(this.vscrollbar)?this.vscrollbar._pos:0;_l-=this._is_over_scroll;if(_l<0){_l=0;}this._toprowpos=this._getScreenTopRowPos(_l);this._bottomrowpos=this._getScreenBottomRowPos(_l);if(_a=="deleterow"||_a=="filterrow"||_a=="deletemultirows"||_a=="filter"){_d._matrix._init();}_d._matrix._adjustRowsDisplay();_d._matrix._adjustColsDisplay();var _m=this._last_scroll_top;if(_m!=_l){_d._update_rows=_d._matrix._adjustScrollRows(_l);}if(this._is_over_scroll>0){this.vscrollbar.set_pos(this.vscrollbar.pos-1);}_d._on_refresh_rows();}var _f=this._getDisplayRowCount();this._updateNodata(_e,_f);};_pGrid.set_enableredraw=function(_a){_a=nexacro._toBoolean(_a);if(this.enableredraw!=_a){this.enableredraw=_a;if(_a){if(this._curFormat){this._curFormat._updateFormatStr();}this.on_apply_enableredraw();}}return _a;};_pGrid.on_apply_enableredraw=function(){if(this._enable_redraw_history["recreate"]){this.redraw();this._enable_redraw_history={};return;}var _a=this._binddataset;if(_a&&_a.oncolumnchanged&&_a.oncolumnchanged._firestat){this._recreate_contents_all(true,true,false);this._enable_redraw_history={};return;}if(this._enable_redraw_history["recreate_body"]){if(this._bodyBand){this._bodyBand._recreate_contents();}}else if(this._enable_redraw_history["refresh_body"]&&!this._enable_redraw_history["refreshall"]){this._refreshBody(true);}if(this._enable_redraw_history["recreate_head"]){if(this._headBand){this._headBand._recreate_contents();}}else if(this._enable_redraw_history["refresh_head"]&&!this._enable_redraw_history["refreshall"]){this._refreshHead(true);}if(this._enable_redraw_history["recreate_summ"]){if(this._summBand){this._summBand._recreate_contents();}}else if(this._enable_redraw_history["refresh_summ"]&&!this._enable_redraw_history["refreshall"]){this._refreshSumm(true);}if(this._enable_redraw_history["resize_band"]){this._resizeBand();}if(this._enable_redraw_history["updatecolsize"]){var _b=this._enable_redraw_history["updatecolsize"];var _c=_b.length;var _d=_b[0];for(var _e=1;_e<_c;_e++ ){_d=Math.min(_b[_e],_d);}this._updateColSize(_d);}if(this._enable_redraw_history["updaterowsize"]){var _b=this._enable_redraw_history["updaterowsize"];var _c=_b.length;for(var _e=0;_e<_c;_e++ ){this._updateRowSize(_b[_e][0],_b[_e][1],(_e<_c-1));}}if(this._enable_redraw_history["autofit"]){var _f=this._enable_redraw_history["autofit"];this._applyAutofittype(_f[0],_f[1]);}if(this._enable_redraw_history["refreshall"]){this._refreshAll(true);}else{nexacro.Component.prototype.on_apply_enableredraw.call(this);}this._enable_redraw_history={};};_pGrid._isSelectedCell=function(_a,_b){var _c=this._selectinfo.getSelectCells(_b);if(!this._isSelectRowType()){if(_c&&_c[_a]){return true;}}else{if(_c){return true;}}return false;};_pGrid.isSelectedCell=function(_a,_b,_c,_d){if(_b){_b=_b.toLowerCase();}if(arguments.length==0){return false;}else if(arguments.length==1){_b="body";_c=0;_d=0;}else if(arguments.length==2){if(_b=="body"){_c=0;}else if(_b.indexOf("summ")>=0){_c= -2;}else{_c= -1;}_d=0;}else if(arguments.length==3){if(_b.indexOf("summ")>=0){_c= -2;}else if(_b=="head"){_c= -1;}_d=0;}return this._isSelectedCell(_a,_c);};_pGrid._getSelect=function(_a){var _b;if(_a== -2){_b="summ";}else if(_a== -1){_b="head";}else{_b="body";}return this.isSelectedCell(0,_b,_a);};_pGrid.getSelectedRows=function(){var _a=[].concat(this._selectinfo.rows);var _b=[];for(var _c=0;_c<_a.length;_c++ ){_b[_c]=this._getTreeRowPosition(_a[_c]);}return _b;};_pGrid.getSelectedDatasetRows=function(){var _a=[].concat(this._selectinfo.rows);for(var _b=0;_b<_a.length;_b++ ){if(_a[_b]<0){_a.splice(_b,1);_b-- ;}}if(_a.length==0){_a= -9;}return _a;};_pGrid.clearSelect=function(){this._selectinfo.area=[];this._resetSelect( -1, -1, -1, -1, -9);return true;};_pGrid.selectRow=function(_a,_b){if(_b==undefined){_b=true;}_a=this._getDataRow(_a);return this._selectRow(_a,_b);};_pGrid.selectCell=function(_a,_b,_c){if(_c==undefined){_c=true;}return this._selectRow(_a,_c,false,_b);};_pGrid.selectArea=function(_a,_b,_c,_d){if(!this._isAreaSelect()){return false;}var _e=this._selectinfo.curcell;var _f=this._selectinfo.curcol;var _g=this._selectinfo.curdsrow;var _h=this._selectinfo.cursubrow;var _i=this._selectinfo.curpvt;if(_a>_c){var _t=_a;_a=_c;_c=_t;}if(_b>_d){var _t=_b;_b=_d;_d=_t;}var _j=this._curFormat;var _k=_j._bodyrows.length-1;var _l="body",_m="body";if(_a== -1){_l="head";}else if(_a== -2){_l="summ";}if(_c== -1){_k=_j._headrows.length-1;_m="head";}else if(_c== -2){_k=_j._summrows.length-1;_m="summ";}function getBegEnd(_u,_b,_d,_v){var _w,_x;if(_v){for(var _y=0;_y<_u.length;_y++ ){if(_u[_y]._col==_b){_w=_y;break;}}return _w;}else{for(var _y=_u.length-1;_y>=0;_y-- ){if(_u[_y]._col<=_d&&_d<=(_u[_y]._col+_u[_y]._colspan)){_x=_y;break;}}return _x;}}var _n,_o,_p,_q,_r,_s;if(_l=="summ"){_s=getBegEnd(_j._summcells,_b,_d,true);}else if(_l=="head"){_s=getBegEnd(_j._headcells,_b,_d,true);}else{_s=getBegEnd(_j._bodycells,_b,_d,true);}this._setSelectedInfo(_s,_b,_a,0,null);_n=_s;_o=_b;_p=_a;_q=0;_r=this._selectinfo.curpvt;if(this._isMultiSelect()){this._multiselect="ctrl";}else{this._clrMultiSelect();this._multiselect="none";}this._ChangeSelect(_n,_o,_p,_q,_r,false,_e,_f,_g,_h,_i,_l,"func_area1");if(_m=="summ"){_s=getBegEnd(_j._summcells,_b,_d,false);}else if(_m=="head"){_s=getBegEnd(_j._headcells,_b,_d,false);}else{_s=getBegEnd(_j._bodycells,_b,_d,false);}this._setSelectedInfo(_s,_d,_c,_k,null);_n=_s;_o=_d;_p=_c;_q=_k;_r=this._selectinfo.curpvt;this._multiselect="shift";retn=this._ChangeSelect(_n,_o,_p,_q,_r,false,_e,_f,_g,_h,_i,_m,"func_area2");return retn;};_pGrid._selectRow=function(_a,_b,_c,_d,_e){var _f=this._selectinfo.curcell;var _g=this._selectinfo.curcol;var _h=this._selectinfo.curdsrow;var _i=this._selectinfo.cursubrow;var _j=this._selectinfo.curpvt;var _k="body";if(_a== -1){_k="head";}else if(_a== -2){_k="summ";}this._setSelectedInfo(null,null,_a,0,null);if(_k!="body"&&_d==undefined){_d=0;}if(_d!=undefined){this._setSelectedInfo(_d,null,null,null,null);}var _l=false;if(!_e){_e=false;}var _m=(this._selectinfo.curcell<0)?0:this._selectinfo.curcell;var _n=(this._selectinfo.curcol<0)?0:this._selectinfo.curcol;var _o=_a;var _p=(this._selectinfo.cursubrow<0)?0:this._selectinfo.cursubrow;var _q=this._selectinfo.curpvt;if(this._isMultiSelect()){if(_b!=this._getSelect(_o)){this._multiselect="ctrl";_l=this._ChangeSelect(_m,_n,_o,_p,_q,_e,_f,_g,_h,_i,_j,_k,"func_selectrow");}}else{this._clrMultiSelect();if(_b==true){_l=this._ChangeSelect(_m,_n,_o,_p,_q,false,_f,_g,_h,_i,_j,_k,"func_selectrow");}}if(!_c){this._refreshBody();if(_k=="head"){this._refreshHead();}else if(_k=="summ"){this._refreshSumm();}}return _l;};_pGrid._on_killfocus=function(_a,_b){if(!this._is_alive){return;}this._hideEditor(undefined,undefined,true);this._focusSelectorPoint(false);if(nexacro._enableaccessibility){this._accept_arrow=false;this._acceptstab=false;}this._is_async_recreate=false;};_pGrid._focusSelectorPoint=function(_a){if(this._isAreaSelect()){if(this._select_ctrl){this._select_ctrl._trackbar[0].set_visible(_a);this._select_ctrl._trackbar[1].set_visible(_a);this._select_ctrl._trackbar[2].set_visible(_a);this._select_ctrl._trackbar[3].set_visible(_a);}}};_pGrid._on_focus=function(_a,_b,_c,_d,_e,_f){this._acceptstab=true;if(this._showEditorFocus){return;}var _g=false;if(!_a){this._focusSelectorPoint(true);}if(_b=="tabkey"||_b=="shifttabkey"){_g=nexacro.Component.prototype._on_focus.call(this,_a,_b,_c,_d,_e,_f);if(this._bodyBand&&(_a==false||nexacro._enableaccessibility)){var _h=this._bodyBand._get_rows();if(_h.length>0){if(_h[0]._cells&&_h[0]._cells.length>0){var _i=null;this._showEditorFocus=true;if(_b=="shifttabkey"){_i=this._getLastEditableCell();if(_i.row!==null){if(this.vscrollbar&&this.vscrollbar.visible){this.vscrollbar.set_pos(this.vscrollbar.max);}_g=this._moveToPosCell(_i.row,_i.cell);}}else{_i=this._getFirstEditableCell();if(_i.row!==null){if(this.vscrollbar&&this.vscrollbar.visible){this.vscrollbar.set_pos(0);}_g=this._moveToPosCell(_i.row,_i.cell);}}if(nexacro._enableaccessibility&&_i.row!==null){this._currentBand="body";var _j=this._getAccessibilityCurrentCell();if(_j){if(_b=="tabkey"){this._first_focus=true;this._is_first_bodycell=true;}this._moveToPosAccessibilityCell(this.currentrow,this.currentcell);}}this._showEditorFocus=false;}}}}else{_g=nexacro.Component.prototype._on_focus.call(this,_a,_b,_c,_d,_e,_f);if(nexacro._enableaccessibility){this._accept_arrow=true;this._acceptstab=true;_g=false;if(nexacro._accessibilitytype==4){this._currentBand="grid";this._moveToAccessibilityCell("next");}}else{if(_a==false){if(_b=="lbuttondown"&&_f&&_f._type_name=="GridCell"){;}else if(this.autoenter=="select"){this._showEditorFocus=true;this._showEditor(false);this._showEditorFocus=false;}}}}if(nexacro._enableaccessibility){this._first_focus=false;}return _g;};_pGrid.on_fire_ontextchange=function(_a,_b,_c,_d,_e,_f){var _g=this._selectinfo.curcell;var _h=this._selectinfo.curcol;var _i=this._selectinfo.curpvt;var _j=this._selectinfo.curdsrow;var _k=this._selectinfo.cursubrow;if(this.ontextchange&&this.ontextchange._has_handlers){var _l=new nexacro.GridTextChangeEventInfo(this,"ontextchange",_g,_b,_h,_i,_f,_d,_e,_c,_j,_k);return this.ontextchange._fireCheckEvent(this,_l);}return true;};_pGrid.on_fire_ontextchanged=function(_a,_b,_c){var _d=this._selectinfo.curcell;var _e=this._selectinfo.curcol;var _f=this._selectinfo.curpvt;var _g=this._selectinfo.curdsrow;var _h=this._selectinfo.cursubrow;if(this.ontextchanged&&this.ontextchanged._has_handlers){var _i=new nexacro.GridTextChangedEventInfo(this,"ontextchanged",_d,_e,_f,_c,_b,_g,_h);return this.ontextchanged._fireEvent(this,_i);}return true;};_pGrid.on_fire_cantreestatuschange=function(_a,_b,_c){var _d=this._selectinfo.curcell;if(this.cantreestatuschange&&this.cantreestatuschange._has_handlers){var _e=new nexacro.GridTreeStatusEventInfo(this,"cantreestatuschange",_d,_b,_a,_c);return this.cantreestatuschange._fireEvent(this,_e);}return true;};_pGrid.on_fire_ontreestatuschanged=function(_a,_b,_c){var _d=this._selectinfo.curcell;if(this.ontreestatuschanged&&this.ontreestatuschanged._has_handlers){var _e=new nexacro.GridTreeStatusEventInfo(this,"ontreestatuschanged",_d,_b,_a,_c);return this.ontreestatuschanged._fireEvent(this,_e);}return true;};_pGrid.on_fire_oncloseup=function(_a,_b,_c,_d,_e){if(this.oncloseup&&this.oncloseup._has_handlers){var _f=this._selectinfo.curcell;var _g=this._selectinfo.curcol;var _h=this._selectinfo.curpvt;var _i=this._selectinfo.curdsrow;var _j=this._selectinfo.cursubrow;var _k=this._evtvalue(_a,_e);var _l=new nexacro.GridEditEventInfo(this,"oncloseup",_f,_g,_h,_i,_j,_k);return this.oncloseup._fireEvent(this,_l);}return true;};_pGrid.on_fire_ondropdown=function(_a){if(this.ondropdown&&this.ondropdown._has_handlers){var _b=this._selectinfo.curcell;var _c=this._selectinfo.curcol;var _d=this._selectinfo.curpvt;var _e=this._selectinfo.curdsrow;var _f=this._selectinfo.cursubrow;var _g=this._evtvalue(_a);var _h=new nexacro.GridEditEventInfo(this,"ondropdown",_b,_c,_d,_e,_f,_g);return this.ondropdown._fireEvent(this,_h);}return true;};_pGrid.on_fire_onenterdown=function(_a,_b,_c,_d,_e,_f,_g){if(this.onenterdown&&this.onenterdown._has_handlers){var _h=this._selectinfo.curcell;var _i=this._selectinfo.curcol;var _j=this._selectinfo.curpvt;var _k=this._selectinfo.curdsrow;var _l=this._selectinfo.cursubrow;var _m=this._evtvalue(_f,_g);var _n=new nexacro.GridEditEventInfo(this,"onenterdown",_h,_i,_j,_k,_l,_m);return this.onenterdown._fireEvent(this,_n);}return true;};_pGrid.on_fire_onexpanddown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){var _m=_k;_m=this._findCellObj(_m);var _n;if(_m&&_m._type_name=="GridCell"){if(_m.parentcell){_n=_m;_m=_m.parentcell;}}var _o=this._recalcXY(_m,_g,_h,false);_g=_o.canvasX;_h=_o.canvasY;_i=_o.clientX;_j=_o.clientY;if(this.onexpanddown&&this.onexpanddown._has_handlers){var _p=this._makeEventInfo(_m,_n,_l);var _q=this._getRootComponent(_l);var _r=_p.cell;var _s=_p.col;var _t=_p.mergecell;var _u=_p.mergecol;var _v=_p.mergerow;var _w=_p.pivotindex;var _x=_p.row;var _y=_p.subrow;var _z=new nexacro.GridMouseEventInfo(_q,"onexpanddown",_r,_s,_t,_u,_v,_w,_x,_y,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);return this.onexpanddown._fireEvent(this,_z);}return false;};_pGrid.on_fire_onexpandup=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){var _m=_k;_m=this._findCellObj(_m);var _n;if(_m&&_m._type_name=="GridCell"){if(_m.parentcell){_n=_m;_m=_m.parentcell;}}var _o=this._recalcXY(_m,_g,_h,false);_g=_o.canvasX;_h=_o.canvasY;_i=_o.clientX;_j=_o.clientY;if(this.onexpandup&&this.onexpandup._has_handlers){var _p=this._makeEventInfo(_m,_n,_l);var _q=this._getRootComponent(_k);var _r=_p.cell;var _s=_p.col;var _t=_p.mergecell;var _u=_p.mergecol;var _v=_p.mergerow;var _w=_p.pivotindex;var _x=_p.row;var _y=_p.subrow;var _z=new nexacro.GridMouseEventInfo(_q,"onexpandup",_r,_s,_t,_u,_v,_w,_x,_y,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);return this.onexpandup._fireEvent(this,_z);}return false;};_pGrid.on_fire_oncolresized=function(_a){if(this.oncolresized&&this.oncolresized._has_handlers){var _b=_a[0];var _c=_a[1];var _d=_a[2];var _e=_a[3];var _f=_a[4];var _g=new nexacro.GridSizeChangedEventInfo("oncolresized",_b,_c,_d,_e,1,_f);return this.oncolresized._fireEvent(this,_g);}return false;};_pGrid.on_fire_onrowresized=function(_a){if(this.onrowresized&&this.onrowresized._has_handlers){var _b=_a[0];var _c=_a[1];var _d=_a[2];var _e=_a[3];var _f=_a[4];var _g=new nexacro.GridSizeChangedEventInfo("onrowresized",_b,_c,_d,_e,2,_f);return this.onrowresized._fireEvent(this,_g);}return false;};_pGrid._clearAllStyleCache=function(){var _a=this._curFormat;if(_a){_a._clearCellStyleCache("head");_a._clearCellStyleCache("body");_a._clearCellStyleCache("summ");}};_pGrid._createVScrollBar=function(_a){var _b=new nexacro.GridScrollBarCtrl("vscrollbar","absolute",0,0,_a,this._client_width,null,null,this);_b._setDirection("vert");_b._setEventHandler("onscroll",this.on_vscroll,this);_b.on_update_style_scrollbarsize();return _b;};_pGrid._is_recreating=false;_pGrid._recreate=function(){if(!this.enableredraw){this._enable_redraw_history["recreate"]=true;return true;}if(!this.getElement()){return false;}this._is_recreating=true;var _a=(this.vscrollbar)?this.vscrollbar._pos:0;var _b=(this.hscrollbar)?this.hscrollbar._pos:0;this._destroyBands();this._createBandsAndAreas();this._refreshBody();this._onResetScrollBar();this._recreate_contents_proc=[];if(this.vscrollbar){this.vscrollbar._set_pixelpos(0);this.vscrollbar._set_pixelpos(_a);}if(this.hscrollbar){this.hscrollbar.set_pos(0);this.hscrollbar.set_pos(_b);}this._is_recreating=false;return true;};_pGrid.createcellasync=false;_pGrid.set_createcellasync=function(_a){_a=nexacro._toBoolean(_a);this.createcellasync=_a;if(nexacro.Browser=="IE"&&nexacro.BrowserVersion<=8){this._async_create=_a;}else{this._async_create=false;}};_pGrid._recreate_contents_all_async=function(_a,_b,_c,_d,_e){nexacro.OnceCallbackTimer.callonce(this,function(){return this._recreate_contents_all(_a,_b,_c,_d,_e);});};_pGrid._isDownActionKeyMouse=function(){var _a=this._getWindow();if(_a&&(_a._cur_ldown_elem||_a._keydown_element)){var _b=_a._cur_ldown_elem||_a._keydown_element,_c=_a.findComponent(_b,0,0)[0],_d=false;while(_c){if(_c._type_name=="Grid"&&_c.id==this.id){_d=true;break;}_c=_c.parent;}return _d;}return false;};_pGrid._recreate_contents_all=function(_a,_b,_c,_d,_e,_f){if(!this.enableredraw){this._enable_redraw_history["recreate"]=true;return;}var _g=this._isDownActionKeyMouse()||this._is_down_act;if(_g&&!this._userRowposChange&&!this._is_after_recreate){var _j=[_a,_b,_c,_d,_e];if(this._after_recreate_contents_all){_j[0]=_j[0]||this._after_recreate_contents_all[0];_j[1]=_j[1]||this._after_recreate_contents_all[1];_j[2]=_j[2]||this._after_recreate_contents_all[2];_j[3]=_j[3]&&this._after_recreate_contents_all[3];_j[2]=_j[4]||this._after_recreate_contents_all[4];}this._after_recreate_contents_all=_j;return;}var _h=this._getDisplayRowCount();if(_b){this._resetRowSizeList(_f);this._resetColSizeList(_f);this._resizeBand();if(this._bodyBand){this._bodyBand._recreate_contents(_a,_c,false,_e);this._bodyBand._matrix._adjustColsDisplay(true);}if(!_d){if(this._headBand){this._headBand._recreate_contents(_a);this._headBand._matrix._adjustColsDisplay(true);}if(this._summBand){this._summBand._recreate_contents(_a);this._summBand._matrix._adjustColsDisplay(true);}}}else{if(this._bodyBand){this._bodyBand._recreate_contents(_a,_c,false,_e);}if(!_d){if(this._headBand){this._headBand._recreate_contents(_a);}if(this._summBand){this._summBand._recreate_contents(_a);}}}var _i=this._getDisplayRowCount();this._updateNodata(_h,_i);this._updateSelector();this._adjustOverlayElements(true,false);};_pGrid._updateNodata=function(_a,_b){if((_a==0&&_b>0)||(_a>0&&_b==0)){var _c=this._bodyBand;if(_c){_c._updateAll(true);}else{this._control_pseudo="";this._contents_pseudo="";this._stat_change();}}};_pGrid._getRowSize=function(_a){var _b=this._curFormat;if(_a== -1){if(this._rowHeadList.length>0){return this._rowHeadList[0];}else{return _b.headHeight;}}else if(_a== -2){if(this._rowSummList.length>0){return this._rowSummList[0];}else{return _b.summHeight;}}else{var _c=this._getDataRow(_a);if(_c>=0){if(this._rowSizeList.length>0){return this._rowSizeList[_c];}else{return _b._body_height;}}}return -1;};_pGrid._getHeadHeight=function(){var _a=this._curFormat;if(_a==null||_a._headband==null){return 0;}var _b=this._rowHeadList[0];if(_b==undefined){_b=_a.headHeight;}return _b;};_pGrid._getSummHeight=function(){var _a=this._curFormat;if(_a==null||_a._summband==null){return 0;}var _b=this._rowSummList[0];if(_b==undefined){_b=_a.summHeight;}return _b;};_pGrid._createBandsAndAreas=function(){if(!this.enableredraw){this._enable_redraw_history["recreate"]=true;return;}var _a=this._curFormat;if(_a==null){return;}this._clearAllStyleCache();this._applyAutofittype(false);var _b=this._curFormat._bodycells;var _c=_b?_b.length:0;var _d;for(var _o=0;_o<_c;_o++ ){_d=_b[_o];if(_d.suppress!=0){this._is_use_suppress=true;break;}}var _e=this._getAvailableRect(this);var _f=_e.width;var _g=_e.height;var _h=this.getElement();var _i,_j;var _k=_a.headHeight;var _l=_a.summHeight;if(this.summarytype=="top"||this.summarytype=="lefttop"){_i=_k+_l;_j=_g;}else{_i=_k;_j=_g-_l;}if(_j<_i){_j=_i;}this._bodyBand=new nexacro.GridBand("body",0,_i,_f,_j-_i,this,_a._bodyband);this.body=_a._bodyband;var _m,_n;if(_l>0){_e=this._getAvailableRect(this);_f=_e.width;_g=_e.height;if(this.summarytype=="top"||this.summarytype=="lefttop"){_i=_k;_j=_k+_l;}else{_j=_g;_i=_j-_l;}this._summBand=_m=new nexacro.GridBand("summ",0,_i,_f,_j-_i,this,_a._summband);this.summ=this.summary=_a._summband;}else{this._summBand=null;}if(_k>0){_e=this._getAvailableRect(this);_f=_e.width;_g=_e.height;_i=0;_j=_k;this._headBand=_n=new nexacro.GridBand("head",0,_i,_f,_j-_i,this,_a._headband);this.head=_a._headband;}else{this._headBand=null;}this._resetRowSizeList();this._resetColSizeList();this._bodyBand.createComponent();_h.setVertScrollElements(this._bodyBand._control_element);if(_n){this._headBand.createComponent();}if(_m){this._summBand.createComponent();}this._updateSelector();this._setHscrollElement();this._setScrollMaxSize(this._bodyBand._scrollWidth,this._bodyBand._scrollHeight);this._control_element._arrangeBandOrder();};_pGrid._band_scroll_sizes=null;_pGrid._setScrollMaxSize=function(_a,_b,_c){if(_c){this._band_scroll_sizes=_c;}if(this._control_element){this._control_element._setInnerElementScrollMaxSize(this._band_scroll_sizes);if(_b==undefined){_b=this._bodyBand._scrollHeight;}this._control_element.setElementScrollMaxSize(_a,_b);this._updateClientSize(this._control_element);}};_pGrid._resizeBand=function(_a){var _b=this._client_left;var _c=this._client_top;var _d=this._client_width;var _e=this._client_height;var _f=this._getHeadHeight();var _g=this._getSummHeight();var _h,_i,_j,_k;_h=_b;_j=_d;if(this._bodyBand){if(this.summarytype=="top"||this.summarytype=="lefttop"){_i=_f+_g;_k=_e-_i;}else{_i=_f;_k=_e-_g-_i;}if(_k<0){_k=0;}this._bodyBand.move(_h,_i,_j,_k);}_e=this._client_height;if(this._summBand){if(this.summarytype=="top"||this.summarytype=="lefttop"){_i=_f;_k=_f+_g-_i;}else{_i=_e-_g;_k=_e-_i;}this._summBand.move(_h,_i,_j,_k);}_e=this._client_height;if(this._headBand){_i=_c;_k=_f;this._headBand.move(_h,_i,_j,_k);}if(!_a&&(this._colautofit||this._rowautofit)){this._applyAutofittype(true);}this._MoveEditComp();this._updateSelector();this._updateScrollInfo();};_pGrid._onResetScrollBar=function(){if(this._scrollbars==1||this._scrollbars==4){if(this._rowautofit){this._scrollbars=0;}}else if(this._scrollbars==2||this._scrollbars==8){if(this._colautofit){this._scrollbars=0;}}else if(this._scrollbars==3){if(this._colautofit&&this._rowautofit){this._scrollbars=0;}if(this._colautofit){this._scrollbars=1;}if(this._rowautofit){this._scrollbars=2;}}else if(this._scrollbars==16){if(this._rowautofit){this._scrollbars=2;}}else if(this._scrollbars==32){if(this._colautofit){this._scrollbars=1;}}return nexacro.Component.prototype._onResetScrollBar.call(this);};_pGrid._setHscrollElement=function(){if(!this._control_element){return;}var _a=[];if(this._bodyBand){var _b=this._bodyBand._get_rows();for(var _c=0;_c<_b.length;_c++ ){_a.push(_b[_c]._control_element);}}if(this._headBand){var _b=this._headBand._matrix._rows;for(var _c=0;_c<_b.length;_c++ ){_a.push(_b[_c]._control_element);}}if(this._summBand){var _b=this._summBand._matrix._rows;for(var _c=0;_c<_b.length;_c++ ){_a.push(_b[_c]._control_element);}}if(_a.length==0){_a=null;}this._control_element.setHorzScrollElements(_a);};_pGrid._resetScrollMax=function(){var _a=this._curFormat;if(!_a){return;}var _b=this._bodyBand;if(!_b){return;}var _c=this._getGridRowCount();var _d=this._getAvailableRect(_b);var _e=_d.width-_a.leftWidth-_a.rightWidth;var _f=_d.height;var _g=_a.bodyWidth;var _h=this._treeIndexes;var _i=this._rowSizeList;var _j;var _k=[];var _l=0;var _m=[];var _n=1;var _o=1500000;var _p=0;for(var _q=0;_q<_c;_q++ ){_j=this._getDataRow(_q);_p+=_i[_j];if(_p-this._fixedrow_height>=_o*_n){_m.push(_p-_i[_j]);_n++ ;}}_p-=this._fixedrow_height;_m.push(_p);_b._scrollHeight=_p;_b._scrollWidth=_g;this._setScrollMaxSize(_b._scrollWidth,_b._scrollHeight,_m);};_pGrid._setContents=function(_a){var _b=nexacro._parseXMLDocument(_a);var _c=_b.getElementsByTagName("Format");var _d=_c.length;var _e="";this._format_str=[];for(var _f=0;_f<_d;_f++ ){var _g=_c[_f];var _h=_g.getAttribute("id");if(_h==null||_h==""){_h="default";}if(_e==""||_h=="default"){_e=_h;}var _i=new nexacro.GridFormat(_h,this);_i._loadFromDOM(_g);this._formats[_h]=_i;this._format_str.push(_h);}this.formats=_a;if(this.formatid==""||this.formatid!=_e){this.formatid=_e;}this._curFormat=this._formats[this.formatid];};_pGrid._destroyBands=function(_a){if(!this.enableredraw){this._enable_redraw_history["recreate"]=true;return;}if(!_a){this._hideEditor(false,true);}if(this._temphead){this._temphead.destroy();this._temphead=null;}if(this._tempsumm){this._tempsumm.destroy();this._tempsumm=null;}if(this._bodyBand){if(this._control_element){this._control_element.setVertScrollElements(null);}this._bodyBand.destroy();this._bodyBand=null;this.body=null;}if(this._summBand){this._summBand.destroy();this._summBand=null;this.summary=null;this.summ=null;}if(this._headBand){this._headBand.destroy();this._headBand=null;this.head=null;}if(this._select_ctrl){this._select_ctrl.destroy();this._select_ctrl=null;}if(this.controlbutton){this.controlbutton=null;}if(this.controlcalendar){this.controlcalendar=null;}if(this.controlcheckbox){this.controlcheckbox=null;}if(this.controlcombo){this.controlcombo=null;}if(this.controledit){this.controledit=null;}if(this.controlmaskedit){this.controlmaskedit=null;}if(this.controltextarea){this.controltextarea=null;}if(this.controlprogressbar){this.controlprogressbar=null;}if(this.controlexpand){this.controlexpand=null;}this._destroyOverlayElements();};_pGrid._refreshAll=function(_a){this._refreshHead(_a);this._refreshSumm(_a);this._refreshBody(_a);};_pGrid._getBodyCellInfo=function(_a){if(this._curFormat){var _b=this._curFormat._bodycells[_a];if(_b){return _b;}}return null;};_pGrid._getBodyCellItem=function(_a,_b){return (this._bodyBand._get_rows()[_a]._cells[_b]);};_pGrid._refreshBodyCell=function(_a,_b,_c){if(!this.enableredraw){this._enable_redraw_history["refresh_body"]=true;return;}if(_b<0){return;}var _d=this._bodyBand;if(_d){var _e=_d._get_rows();if(_e.length<=_b){return;}var _f=_e[_b]._rowidx;var _g=(this._hasTree)?this._treeIndexes[_f]:_f;var _h=this._isSelectedCell(_a,_g);if(_e[_b]){var _i=_e[_b]._cells[_a];if(_c){if(_i){_i.currentstyle._empty();}}_d._refreshRowCell(_b,_a,_h);}}};_pGrid._refreshHead=function(_a){if(!this.enableredraw){this._enable_redraw_history["refresh_head"]=true;return;}var _b=this._headBand;if(_b){var _c=_b._get_rows().length;_b._updateAll(_a);for(var _d=0;_d<_c;_d++ ){_b._refreshRow(_d);}}this._applyResizer();};_pGrid._refreshSumm=function(_a){if(!this.enableredraw){this._enable_redraw_history["refresh_summ"]=true;return;}var _b=this._summBand;if(_b){var _c=_b._get_rows().length;_b._updateAll(_a);for(var _d=0;_d<_c;_d++ ){_b._refreshRow(_d);}_b._updateAll(_a);}};_pGrid._refreshBody=function(_a,_b,_c,_d){if(!this.enableredraw){this._enable_redraw_history["refresh_body"]=true;return;}var _e=this._bodyBand;if(_e){if(!_d){this._suppressUpdate();}var _f=this._getDispRowCnt();var _g=_e._get_rows();var _h;_e._updateAll(_a);for(var _i=0;_i<_f;_i++ ){_e._refreshRow(_i,undefined,_b);}if(!_c){this._adjustOverlayElements(false,false);}}};_pGrid._MoveEditComp=function(){if(this._showEditing){this._showEditor(true);}};_pGrid._analyzeSuppress=function(_a){var _b=this._curFormat._bodycells;if(!_b){return;}var _c;if(_a){_c=this._getGridRowCount();}else{var _g=this._bodyBand;var _h=_g._get_rows();_c=_h.length;}if(_c==0){return;}var _d=_b.length;var _e;for(var _i=0;_i<_d;_i++ ){_e=_b[_i];if(_e.suppress==0){continue;}_e._clearSuppressInfo();var _j,_k,_l,_m,_n,_o,_p,_q,_r,_s;var _t=this._fixed_endrow;for(var _u=0;_u<_c;_u++ ){_j=(!_a)?this.__getBodyCellRowIdxFromIdx(_u):_u;_r=this._getDataRow(_j);_s=_e._getSuppress(_r);if(_s>0&&_u>0){_p=_e._getSuppressInfo(_u-1);_m=0;_n=0;_q=this._getDataRow(_j-1);_r=this._getDataRow(_j);if(this._hasTree){_k=_e._getDisplayText(_q);_m=_e._getTreeLevel(_q);_l=_e._getDisplayText(_r);_n=_e._getTreeLevel(_r);}else{_k=_e._getDisplayText(_q);_l=_e._getDisplayText(_r);}if(this._isFakeCell(_r)){continue;}_o=_e._getDisplaytype(_j);if(this._hasTree&&_o=="tree"){;}else{if(_k==_l){_p.last=false;}else{_p.last=true;}}}else if(_s<0&&_i>0){}}}var _f=this.suppresslevel;if(_f=="sameskip"||_f=="allcompare"){var _u=0;function __analyzeSuppress_row_loop2(_v){if(_u<_c){var _w=[];var _x=[];var _e;_j=(!_a)?_v.__getBodyCellRowIdxFromIdx(_u):_u;_r=_v._getDataRow(_j);for(var _i=0;_i<_d;_i++ ){_e=_b[_i];_s=_e._getSuppress(_r);if(_s>0){_w.push(_e);}if(_s<0){}}if(_w.length>0){_w.sort(function(_y,_z){return _y._getSuppress(_r)-_z._getSuppress(_r);});var _y=_w.length;for(var _z=0;_z<_y;_z++ ){_e=_w[_z];if(_e){for(var _aa=0;_aa<_d;_aa++ ){if(_aa==_e._col){continue;}_v._compareSuppressCol(_u,_aa,_e._col,_f,_r);}}}}if(_x.length>0){_x.sort(function(_ab,_ac){return _ac._getSuppress(_r)-_ab._getSuppress(_r);});var _ab=_x.length;for(var _z=0;_z<_ab;_z++ ){_e=_x[_z];if(_e){for(var _aa=0;_aa<_d;_aa++ ){if(_aa==_e._col){continue;}}}}}_u++ ;return false;}return true;}for(;true;){if(__analyzeSuppress_row_loop2(this)){break;}if(__analyzeSuppress_row_loop2(this)){break;}if(__analyzeSuppress_row_loop2(this)){break;}if(__analyzeSuppress_row_loop2(this)){break;}if(__analyzeSuppress_row_loop2(this)){break;}if(__analyzeSuppress_row_loop2(this)){break;}if(__analyzeSuppress_row_loop2(this)){break;}if(__analyzeSuppress_row_loop2(this)){break;}if(__analyzeSuppress_row_loop2(this)){break;}if(__analyzeSuppress_row_loop2(this)){break;}}}if(_c>0){var _v=0;var _w;var _x,_y,_s,_j,_r;for(var _i=0;_i<_d;_i++ ){_w=0;var _e,_z;for(var _u=0;_u<_c;_u++ ){_e=_b[_i];_j=(!_a)?this.__getBodyCellRowIdxFromIdx(_u):_u;_r=this._getDataRow(_j);if(_e.suppressalign.indexOf("middle")<0){break;}_x=_e._getSuppressInfo(_u);_x.middle=false;_s=_e._getSuppress(_r);if(_s>0){_v++ ;if(_x.last==true){if(_v==1){_x.middle=true;}else{_z=Math.round(_v/2);_y=_e._getSuppressInfo(_w+_z-1);_y.middle=true;}_w=_u+1;_v=0;}}if(_s<0){;}}}}};_pGrid._compareSuppressCol=function(_a,_b,_c,_d,_e){var _f=this._bodyBand;var _g=this._curFormat._bodycells;var _h=_g[_b];var _i=_g[_c];var _j,_k;var _l=_i._getSuppress(_e);var _m=_h._getSuppress(_e);if(_l<=0||_m<=0){return false;}if(_m<_l){_j=_h._getSuppressInfo(_a);_k=_i._getSuppressInfo(_a);if(_j.last==true){_k.last=true;}return true;}else if(_d=="allcompare"&&_m==_l){_j=_h._getSuppressInfo(_a);_k=_i._getSuppressInfo(_a);if(_j.last==true){_k.last=true;}if(_k.last==true){_j.last=true;}return true;}return false;};_pGrid.__getBodyCellRowIdxFromIdx=function(_a,_b){var _c;if(this._fixed_rowcnt){if(_a+this._fixed_startrow<=this._fixed_endrow){_c=this._fixed_startrow;}else{_a-=this._fixed_rowcnt-this._fixed_startrow;_c=(_b)?this._toprowpos[0]:this._begrowpos;}}else{_c=(_b)?this._toprowpos[0]:this._begrowpos;}return _a+_c;};_pGrid._suppressUpdate=function(){if(!this._is_use_suppress){return;}this._analyzeSuppress();var _a=this._bodyBand;var _b=_a._get_rows();var _c=_b.length;var _d=(this._fixed_rowcnt)?this._fixed_startrow:this._toprowpos[0];var _e=this._bottomrowpos;var _f=0;var _g=_c-1;for(var _h=0;_h<_c;_h++ ){if(_b[_h]._rowidx==_d){_f=_h;}else if(_b[_h]._rowidx==_e){_g=_h;break;}if(_e<0){break;}}for(var _h=_f;_h<=_g;_h++ ){this._suppressUpdateRow(_h,_f,_g);}};_pGrid._suppressUpdateRow=function(_a,_b,_c){var _d=this._bodyBand;var _e=_d._get_rows();if(_d==null||_e.length==0){return;}var _f=this._curFormat._bodycells;var _g=_f.length;var _h=this.__getBodyCellRowIdxFromIdx(_a,true);var _i,_j,_k,_l;var _m,_n,_o;var _p=this._getDataRow(_h);for(var _q=0;_q<_g;_q++ ){_i=_f[_q];_n=_i._getSuppressInfo(_a);_o=_i._getSuppress(_p);if(_o>0){if(_o>0&&(_a-_b)>0){_m=_i._getSuppressInfo(_a-1);}else if(_i.csupp<0&&_q>0){var _r=_f[_q-1];_m=_r._getSuppressInfo(_a);}_k=(_m?_m.last:true);_l=(_a==_c?true:_n.last);if(_i.suppressalign.indexOf("first")>=0){if(_k==false){_n.text_proc=_o;}else{_n.text_proc=0;}}else if(_i.suppressalign.indexOf("last")>=0){if(_l==false){_n.text_proc=_o;}else{_n.text_proc=0;}}else if(_i.suppressalign.indexOf("middle")>=0){if(_n.middle==true){_n.text_proc=0;}else{_n.text_proc=_o;}}if(_m){if(_k==false){_m.border_proc=_o;}else{_m.border_proc=0;}}}}};_pGrid._refreshBodyRow=function(_a,_b,_c){if(!this.enableredraw){this._enable_redraw_history["refresh_body"]=true;return;}var _d=this._bodyBand;if(_d){var _e=_d._get_rows();if(_e.length<=_a){return;}var _f=this._getDispRowCnt();if(_a>=0&&_a<_f){var _g=_e[_a]._rowidx;var _h=(this._hasTree)?this._treeIndexes[_g]:_g;if(_h==undefined){return;}_d._refreshRow(_a,_b);}}};_pGrid._setGlobalCursor=function(_a,_b){this._global_cursor=_a;while(_b){_b._updateCursor(_a);if(_b instanceof nexacro.Grid){return;}_b=_b.parent;}};_pGrid._getColMergeInfo=function(_a,_b){var _c;if(_a=="head"){_c=this._curFormat._headcells;}else if(_a=="summ"||_a=="summary"){_c=this._curFormat._summcells;}else{_c=this._curFormat._bodycells;}if(!_c){return null;}var _d=_c.length;var _e;var _f=_b;var _g=1;var _h=[];for(var _i=0;_i<_d;_i++ ){_e=_c[_i];if(_e._col<=_b&&(_e._col+_e._colspan)>_b){if(_g<_e._colspan){_g=_e._colspan;_f=_e._col;}}}_h[0]=_f;_h[1]=_g;return _h;};_pGrid._applySelect=function(_a,_b,_c){var _d=false;if(this.summarytype=="top"||this.summarytype=="lefttop"){_d=true;}if(_a.length==0||(_d&&_c<0)){_a.splice(0,0,_c);_b.splice(0,0,_c);}else{var _e,_f;var _g=0;if(_d){for(var _h=0;_h<_a.length;_h++ ){if(_a[_h]>=0){break;}_g++ ;}_e=_a.splice(0,_g);_f=_b.splice(0,_g);}var _i=_a.length;if(_i==0){_a.splice(0,0,_c);_b.splice(0,0,_c);}else if(_i==1||_a[0]>_c){this._addSelect(_a,_b,0,_c);}else if(_b[_i-1]<_c){this._addSelect(_a,_b,_i-1,_c);}else{for(var _h=0;_h<_i;_h++ ){if(_b[_h]<_c&&_a[_h+1]>_c){if((_b[_h]+1)==_c&&(_a[_h+1]-1)>_c){this._addSelect(_a,_b,_h,_c);}else if((_b[_h]+1)<_c&&(_a[_h+1]-1)==_c){this._addSelect(_a,_b,_h+1,_c);}else if((_b[_h]+1)==_c&&(_a[_h+1]-1)==_c){this._addSelect(_a,_b,_h,_c);_b[_h]=_b[_h+1];_a.splice(_h+1,1);_b.splice(_h+1,1);}else if((_b[_h]+1)<_c&&(_a[_h+1]-1)>_c){_a.push(_c);_b.push(_c);_a.sort();_b.sort();}break;}}}if(_d){for(var _h=0;_h<_e.length;_h++ ){_a.splice(0,0,_e[_h]);_b.splice(0,0,_f[_h]);}}}};_pGrid._addSelect=function(_a,_b,_c,_d){if(_b[_c]<_d){if((_b[_c]+1)==_d){_b[_c]=_d;}else{_a.push(_d);_b.push(_d);}}else if(_a[_c]>_d){if((_a[_c]-1)==_d){_a[_c]=_d;}else{_a.push(_d);_b.push(_d);_a.sort();_b.sort();}}};_pGrid._findCellObj=function(_a){var _b=_a;while(_b&&_b._type_name!="GridCell"){if(_b._type_name=="Grid"){if(_b==this){break;}else{_b=_a;break;}}if(_b._cellobj&&_b._cellobj._type_name=="GridCell"){_b=_b._cellobj;break;}_b=_b.parent;}return _b;};_pGrid._findBandObj=function(_a){var _b=_a;while(_b&&_b._type_name!="GridBand"){if(_b==this){break;}_b=_b.parent;}return _b;};_pGrid._getHScrollPos=function(){if(!this.hscrollbar.visible){return 0;}return this.hscrollbar.pos;};_pGrid._isFakeCell=function(_a){if(this._rowcount<=_a||_a< -2){return true;}return false;};_pGrid._moveToPosCell=function(_a,_b){var _c=_a;var _d=true;if(_c==undefined){_c=0;}if(this._isFakeCell(_c)){return false;}var _e=this._getBodyCellInfo(_b);if(!_e){return false;}var _f=this._beforebodycellpos=this._selectinfo.curcell;var _g=this._beforebodycolpos=this._selectinfo.curcol;var _h=this._beforebodyrowpos=this._selectinfo.curdsrow;var _i=this._beforebodysubrowpos=this._selectinfo.cursubrow;var _j=this._beforepvt=this._selectinfo.curpvt;var _k=_b;var _l=_e._col;var _m=_c;var _n=_e._row;var _o= -9;this._setSelectedInfo(_k,_l,_m,_n,_o);while(true){if(_k!=_f){break;}if(_l!=_g){break;}if(_m!=_h){break;}if(_n!=_i){break;}if(_o!=_j){break;}_d=false;break;}if(_d){_d=this._ChangeSelect(_k,_l,_m,_n,_o,false,_f,_g,_h,_i,_j,"body");}this._moveCellAfterFocus();return _d;};_pGrid._getColFixCnt=function(_a){if(this._curFormat){return this._curFormat._getColFixCnt(_a);}return -1;};_pGrid._getGridBand=function(_a){if(!this._curFormat||!this._curFormat._bodycells){return -1;}var _b=this._curFormat._bodycells[_a];if(_b){if(this._bPivotGrid){var _c=this._getColFixCnt("left");var _d=this._getColFixCnt("right");if(_b._col<_c){return -1;}else if(_b._col>=(this._curFormat._bodycells.length-right)){return -2;}else{return 0;}}else{return 0;}}return -9;};_pGrid._clrMultiSelect=function(){this._selectinfo.rows=[];this._selectinfo.selects=[];this._selectstartrow=[];this._selectstartcol=[];this._selectstartsubrow=[];this._selectstartpvt=[];this._selectendrow=[];this._selectendcol=[];this._selectendsubrow=[];this._selectendpvt=[];this._defaultSelect();};_pGrid._isIncludeSelectpos=function(_a,_b){var _c=this._selectinfo.getSelectCells(_b);if(_c&&_c[_a]){return true;}return false;};_pGrid._addSelectpos=function(_a,_b){var _c=this._selectinfo.selects;var _d=this._selectinfo.rows;if(!_c[_b+2]){_c[_b+2]=[];}_c[_b+2][_a]=true;for(var _e=0;_e<_d.length;_e++ ){if(_d[_e]==_b){return;}}_d.push(_b);_d.sort(function(_f,_g){return _f-_g;});};_pGrid._delSelectpos=function(_a,_b,_c){var _d=this._selectinfo.selects;var _e=this._selectinfo.rows;if(_a<0){if(nexacro._isArray(_b)){var _f=_b.length;for(var _g=_f-1;_g>=0;_g-- ){if(_c){if(_d[_b[_g]+2]){_d.splice(_b[_g]+2,1);}}else{_d[_b[_g]+2]=undefined;}for(var _h=0;_h<_e.length;_h++ ){if(_e[_h]==_b[_g]){_e.splice(_h,1);break;}}}}else{if(_c){if(_d[_b+2]){_d.splice(_b+2,1);}}else{_d[_b+2]=undefined;}for(var _h=0;_h<_e.length;_h++ ){if(_e[_h]==_b){_e.splice(_h,1);break;}}}}else{if(nexacro._isArray(_b)){var _f=_b.length;var _i,_j;for(var _g=_f-1;_g>=0;_g-- ){_i=_d[_b[_g]+2];if(_i){_i[_a]=false;}_j=false;for(var _h=0;_h<_i.length;_h++ ){if(_i[_h]){_j=true;break;}}if(!_j){_d[_b+2]=undefined;for(var _h=0;_h<_e.length;_h++ ){if(_e[_h]==_b[_g]){_e.splice(_h,1);break;}}}}}else{var _i=_d[_b+2];if(_i){_i[_a]=false;}var _j=false;for(var _h=0;_h<_i.length;_h++ ){if(_i[_h]){_j=true;break;}}if(!_j){_d[_b+2]=undefined;for(var _h=0;_h<_e.length;_h++ ){if(_e[_h]==_b){_e.splice(_h,1);break;}}}}}};_pGrid._resetSelectStartEndRow=function(){var _a=this._selectinfo.selects;this._selectstartrow=[];this._selectendrow=[];for(var _b=0;_b<_a.length;_b++ ){if(_a[_b]){this._applySelect(this._selectstartrow,this._selectendrow,_b-2);}}this.selectstartrow=this._selectstartrow;this.selectendrow=this._selectendrow;if(!this.selectstartrow.length){this.selectstartrow= -9;}if(!this.selectendrow.length){this.selectendrow= -9;}};_pGrid._isMultiSelected=function(){if(!this._curFormat||!this._curFormat._bodycells){return false;}if(this._isSelectRowType()){if(this._selectinfo.rows.length>1){return true;}}else{if(this._selectinfo.rows.length>1){return true;}else if(this._selectinfo.rows.length==1){var _a=this._selectinfo.selects[this._selectinfo.rows[0]+2];var _b=0;for(var _c=0;_c<_a.length;_c++ ){if(_a[_c]){_b++ ;}if(_b>1){return true;}}}}return false;};_pGrid._initSelect=function(_a,_b,_c,_d,_e){_b=(_b!==undefined)?_b:0;_c=(_c!==undefined)?_c:0;_a=(_a!==undefined)?_a:0;_d=(_d!==undefined)?_d:0;_e=(_e!==undefined)?_e: -9;this._resetSelect(_a,_b,_c,_d,_e);};_pGrid._resetSelect=function(_a,_b,_c,_d,_e){var _f=this._selectinfo.curcell;var _g=this._selectinfo.curcol;var _h=this._selectinfo.curdsrow;var _i=this._selectinfo.cursubrow;var _j=this._selectinfo.curpvt;_b=(_b!==undefined)?_b:this._selectinfo.curcell;_c=(_c!==undefined)?_c:this._selectinfo.curcol;_a=(_a!==undefined)?_a:this._selectinfo.curdsrow;_d=(_d!==undefined)?_d:this._selectinfo.cursubrow;_e=(_e!==undefined)?_e:this._selectinfo.curpvt;if(this.getElement()){if(_a>=0&&_b<0){if(this._isSelectRowType()){_b=0;}else{_b=_c=_d=0;}}this._clrMultiSelect();this._multiselect="none";this._setSelectedInfo(_b,_c,_a,_d,_e);this._ChangeSelect(_b,_c,_a,_d,_e,true,_f,_g,_h,_i,_j,"body");this._refreshHead(true);this._refreshSumm(true);}};_pGrid._ChangeSelect=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m){_f=_f||false;var _n=this._multiselect;var _o=this._curFormat;if(!_o||(this._setdataobj&&this._setdataobj.succ==false)){this._setdataobj=null;this._setSelectedInfo(_g,_h,_i,_j,_k);return false;}var _p,_q,_r,_s=0;var _t=false;if(_l=="head"){_p=_o._headcells;_t=(_i!=_c||_g!=_a);if(_o._headrows){_s=_o._headrows.length;}}else if(_l=="summ"||_l=="summary"){_p=_o._summcells;_t=(_i!=_c||_g!=_a);if(_o._summrows){_s=_o._summrows.length;}}else{_p=_o._bodycells;if(this._isSelectRowType()){_t=(_i!=_c);}else{_t=(_i!=_c||_g!=_a);}if(_o._bodyrows){_s=_o._bodyrows.length;}}if(!_p){this._setSelectedInfo(_g,_h,_i,_j,_k);return false;}_q=_p.length;_r=_p[_a];var _u=false;if((_l=="body"&&_c<0)||_a<0){_u=(_n!="normal");this._clrMultiSelect();this._selectDraw(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_u,[]);this._selectinfo.area=[];this._defaultSelect();if(_t){this.on_fire_onselectchanged(this,_a,_b,_c,_d,_e,_g,_h,_i,_j,_k,this.selectendcol,this.selectendpivot,this.selectendrow,this.selectendsubrow,this.selectstartcol,this.selectstartpivot,this.selectstartrow,this.selectstartsubrow);}return true;}else if(!_r){this._setSelectedInfo(_g,_h,_i,_j,_k);return false;}_u=(this._selectClear||_u);this._selectClear=false;var _v=false;if(_n=="ctrl"){if(this.selecttype=="multirow"){if(!this._isIncludeSelectpos(0,_c)){_v=true;}}if(this.selecttype=="multicell"){if(!this._isIncludeSelectpos(_a,_c)){_v=true;}}}if(_f==false){if(this._binddataset&&_l=="body"&&_c>=0&&(_v==true||_i!=_c)){this._userRowposChange=true;var _ab=this._binddataset._setRowPosition(_c,undefined,51);this._userRowposChange=false;if(_c!=_ab){this._setSelectedInfo(_g,_h,_i,_j,_k);this._selectDraw(_g,_h,_i,_j,_k,_f,_a,_b,_c,_d,_e,true,[]);return false;}}}var _w=this._selectinfo.ctrlpoint;var _x=[];var _y=false;var _z=0;function makeClearRows(_ac){var _ad=_ac._selectinfo.rows;var _ae=0;_x=[];for(var _af=0;_af<_ad.length;_af++ ){_x[_ae++ ]=_ac._dsRowToDispRow(_ad[_af]);}return _ad;};if(_n=="none"){if(_l=="body"){if(this._isAreaSelect()||this._isMultiSelect()){if(this._isIncludeSelectpos(_a,_c)){if(_m=="keydown"||_m=="mousemove"){_y=true;}else{_w._set(_r,_c,_s);return false;}}else{if(_m=="lbuttonup"){_y=true;}}if(_m=="mousemove"){this._is_drag_selecting=true;}else{_x=makeClearRows(this);this._clrMultiSelect();if(_m!="lbuttonup"){_w._set(_r,_c,_s);}}}else{this._clrMultiSelect();_w._set(_r,_c,_s);}}else{_x=makeClearRows(this);this._clrMultiSelect();_w._set(_r,_c,_s);}this._selectinfo.area=[];}else if(_n=="ctrl"){if(_m!="mousemove"){_w._set(_r,_c,_s);}if(this.selecttype=="multirow"){if(_v==false&&(_m=="lbuttondown"||(_m&&_m.indexOf("func")>=0))){this._delMultirowSelectInfo(_c);this._delSelectpos( -1,_c);this._resetSelectStartEndRow();this._selectDraw(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_u,_x);this._defaultSelect();this.on_fire_onselectchanged(this,_a,_b,_c,_d,_e,_g,_h,_i,_j,_k,this.selectendcol,this.selectendpivot,this.selectendrow,this.selectendsubrow,this.selectstartcol,this.selectstartpivot,this.selectstartrow,this.selectstartsubrow);return true;}_y=true;_z=this._selectinfo.area.length;if(_m=="mousemove"){this._is_drag_selecting=true;_z-- ;}}else if(this.selecttype=="multiarea"){_z=this._selectinfo.area.length;if(_m=="mousemove"){this._is_drag_selecting=true;_z-- ;}}}else if(_n=="shift"){if(this.selecttype=="multiarea"){_z=this._selectinfo.area.length-1;}this._clrMultiSelect();_u=true;}if(this._isSelectRowType()==false){if(_t){_y=true;}if(this._isAreaSelect()){this._applyAreaSelectPos(_a,_c,_z,"area");}else{this._addSelectpos(_a,_c);this._applySelect(this._selectstartrow,this._selectendrow,_c);this._applySelect(this._selectstartcol,this._selectendcol,_b);this._applySelect(this._selectstartsubrow,this._selectendsubrow,_d);}}else{if(_t){_y=true;}if(this._isMultiSelect()){this._applyAreaSelectPos(_a,_c,_z,"row");}else{for(var _ac=0;_ac<_q;_ac++ ){this._addSelectpos(_ac,_c);}this._applySelect(this._selectstartrow,this._selectendrow,_c);}}this._defaultSelect();var _aa=false;if(_f==false){if(this._binddataset&&_l=="body"&&_c>=0&&(_v==true||_i!=_c)){this._rowposition=_c;_aa=true;}else{if(_u==true){_aa=true;}else if(_y==true){_aa=true;}}}else{_u=(this._isMultiSelect()||this._isAreaSelect());_aa=true;}if(_aa){this._selectDraw(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_u,_x,_m);}if(_y&&_m!="func_area1"){this.on_fire_onselectchanged(this,_a,_b,_c,_d,_e,_g,_h,_i,_j,_k,this.selectendcol,this.selectendpivot,this.selectendrow,this.selectendsubrow,this.selectstartcol,this.selectstartpivot,this.selectstartrow,this.selectstartsubrow);}return true;};_pGrid._applyAreaSelectPos=function(_a,_b,_c,_d){var _e=this._curFormat;var _f,_g,_h;var _i=[],_j=0,_k=0,_l=[],_m=0,_n=0,_o=[],_p=0,_q=0;if(_e._bodycells){_i=_e._bodycells;_j=_i.length;_k=_e._bodyrows.length;}if(_e._headcells){_l=_e._headcells;_m=_l.length;_n=_e._headrows.length;}if(_e._summcells){_o=_e._summcells;_p=_o.length;_q=_e._summrows.length;}if(_b== -2){_f=_o;_h=_q;}else if(_b== -1){_f=_l;_h=_n;}else{_f=_i;_h=_k;}var _g=_f.length;var _r=this._selectinfo.ctrlpoint;var _s=_f[_a];var _t,_u,_v,_w,_x=[],_y=[],_z;_v=Math.min(_b,_r.row);_w=Math.max(_b,_r.row);_t=Math.min(_r.col,_s._col);_u=Math.max((_r.col+_r.colspan-1),(_s._col+_s._colspan-1));if(_r.row<_b){_v=_r.row;_w=_b;_z=_w-_v;_x[0]=_r.subrow;_y[0]=_r.subrowslen-1;_x[_z]=0;_y[_z]=_s._row+_s._rowspan-1;}else if(_r.row>_b){_v=_b;_w=_r.row;_z=_w-_v;_x[0]=_s._row;_y[0]=_h-1;_x[_z]=0;_y[_z]=_r.subrow+_r.rowspan-1;}else{_v=_w=_b;_z=0;_x[0]=Math.min(_s._row,_r.subrow);_y[0]=Math.max(_s._row+_s._rowspan-1,_r.subrow+_r.rowspan-1);}var _aa;for(var _ai=_v+1;_ai<_w;_ai++ ){_aa=_ai-_v;_x[_aa]=0;if(_ai== -1){_y[_aa]=_n-1;}else{_y[_aa]=_k-1;}}var _ab;if(_d=="area"){if(_v>=0||_v==_w){_ab=this._adjustMergeArea(_f,_t,_u,_v,_w,_x,_y);}else{var _aj,_ak;var _al=_t,_am=_u;while(true){_aj=[].concat(_x);_ak=[].concat(_y);if(_v== -2){var _an=_aj.splice(0,1);var _ao=_ak.splice(0,1);var _ap=_aj.splice(0,1);var _aq=_ak.splice(0,1);_ab=this._adjustMergeArea(_o,_al,_am, -2, -2,_an,_ao);_al=_ab.begcol;_am=_ab.endcol;_ab=this._adjustMergeArea(_l,_al,_am, -1, -1,_ap,_aq);if(_al!=_ab.begcol||_am!=_ab.endcol){_al=_ab.begcol;_am=_ab.endcol;continue;}}else if(_v== -1){var _ap=_aj.splice(0,1);var _aq=_ak.splice(0,1);_ab=this._adjustMergeArea(_l,_al,_am, -1, -1,_ap,_aq);_al=_ab.begcol;_am=_ab.endcol;}if(_w>=0){_ab=this._adjustMergeArea(_i,_al,_am,0,_w,_aj,_ak);}if(_al!=_ab.begcol||_am!=_ab.endcol){_al=_ab.begcol;_am=_ab.endcol;continue;}break;}_ab.begrow=_v;_ab.begsubrow=_x;_ab.endsubrow=_y;}}else{_ab=this._adjustRowArea(_v,_w);}this._selectinfo.area[_c]=_ab;var _ac=this._selectinfo.area;var _ad=_ac.length;this._clrMultiSelect();var _ae,_af,_ag,_ah;if(_d=="area"){for(var _ar=0;_ar<_ad;_ar++ ){_t=_ac[_ar].begcol;_u=_ac[_ar].endcol;_v=_ac[_ar].begrow;_w=_ac[_ar].endrow;_x=_ac[_ar].begsubrow;_y=_ac[_ar].endsubrow;this._selectstartrow[_ar]=_v;this._selectendrow[_ar]=_w;this._selectstartcol[_ar]=_t;this._selectendcol[_ar]=_u;this._selectstartsubrow[_ar]=_x[0];this._selectendsubrow[_ar]=_y[_y.length-1];for(var _ai=_v,_as=0;_ai<=_w;_ai++ ,_as++ ){if(_ai== -2){_f=_o;_g=_p;}else if(_ai== -1){_f=_l;_g=_m;}else{_f=_i;_g=_j;}for(var _at=0;_at<_g;_at++ ){_ae=_f[_at]._col;_af=_f[_at]._col+_f[_at]._colspan-1;_ag=_f[_at]._row;_ah=_f[_at]._row+_f[_at]._rowspan-1;if(_ae>=_t&&_af<=_u&&_ag>=_x[_as]&&_ah<=_y[_as]){this._addSelectpos(_at,_ai);}}}}}else{for(var _ar=0;_ar<_ad;_ar++ ){_v=_ac[_ar].begrow;_w=_ac[_ar].endrow;for(var _ai=_v,_as=0;_ai<=_w;_ai++ ,_as++ ){if(_ai== -2){_g=_p;}else if(_ai== -1){_g=_m;}else{_g=_j;}if(_g==0){continue;}for(var _at=0;_at<_g;_at++ ){this._addSelectpos(_at,_ai);}this._applySelect(this._selectstartrow,this._selectendrow,_ai);}}}};_pGrid._delMultirowSelectInfo=function(_a){var _b=this._selectinfo.area;var _c=_b.length;for(var _d=0;_d<_c;_d++ ){if(_b[_d].begrow==_b[_d].endrow&&_b[_d].begrow==_a){_b.splice(_d,1);break;}else if(_b[_d].begrow==_a&&_b[_d].endrow!=_a){_b[_d].begrow++ ;break;}else if(_b[_d].endrow==_a&&_b[_d].begrow!=_a){_b[_d].endrow-- ;break;}else if(_b[_d].begrow<_a&&_b[_d].endrow>_a){var _e=_b[_d].endrow;_b[_d].endrow=_a-1;var _f=this._adjustRowArea(_a+1,_e);_b.splice(_d+1,0,_f);break;}}};_pGrid._adjustRowArea=function(_a,_b){return {begcol: -1,endcol: -1,begrow:_a,endrow:_b,begsubrow:[],endsubrow:[]};};_pGrid._adjustMergeArea=function(_a,_b,_c,_d,_e,_f,_g){var _h=_e-_d;var _i=_a.length;var _j,_k,_l,_m;var _n,_o=_f.length;for(var _p=0;_p<_i;_p++ ){_j=_a[_p]._col;_k=_a[_p]._col+_a[_p]._colspan-1;_l=_a[_p]._row;_m=_a[_p]._row+_a[_p]._rowspan-1;_n=false;for(var _q=0;_q<_o;_q++ ){if(((_b<=_j&&_c>=_j)||(_b<=_k&&_c>=_k)||(_b>_j&&_c<_k))&&((_f[_q]<=_l&&_g[_q]>=_l)||(_f[_q]<=_m&&_g[_q]>=_m)||(_f[_q]>_l&&_g[_q]<_m))){if(_b>_j){_b=_j;_n=true;}if(_c<_k){_c=_k;_n=true;}if(_q==0){if(_f[0]>_l){_f[0]=_l;_n=true;}}if(_q==_h){if(_g[_h]<_m){_g[_h]=_m;_n=true;}}if(_n==true){_p=0;break;}}}}return {begcol:_b,endcol:_c,begrow:_d,endrow:_e,begsubrow:_f,endsubrow:_g};};_pGrid._defaultSelect=function(){this.selectstartrow=this._selectstartrow;this.selectstartcol=this._selectstartcol;this.selectstartsubrow=this._selectstartsubrow;this.selectstartpivot=this._selectstartpvt;this.selectendrow=this._selectendrow;this.selectendcol=this._selectendcol;this.selectendsubrow=this._selectendsubrow;this.selectendpivot=this._selectendpvt;if(!this.selectstartrow.length){this.selectstartrow= -9;}if(!this.selectstartcol.length){this.selectstartcol= -1;}if(!this.selectstartsubrow.length){this.selectstartsubrow= -1;}if(!this.selectstartpivot.length){this.selectstartpivot= -9;}if(!this.selectendrow.length){this.selectendrow= -9;}if(!this.selectendcol.length){this.selectendcol= -1;}if(!this.selectendsubrow.length){this.selectendsubrow= -1;}if(!this.selectendpivot.length){this.selectendpivot= -9;}};_pGrid._dsRowToDispRow=function(_a,_b){var _c;if(this._hasTree){_c=this._getTreeRowPosition(_a);}else{_c=_a;}if(_b){_c-=this._getBodyBegRowPos(_c);}return _c;};_pGrid._jumpCurrentRow=function(_a){if(_a<0){return this._begrowpos;}var _b=this._toprowpos[0];var _c=this.vscrollbar;var _d=this._getBodyBegRowPos(_a);if(this._lbuttondown_proc==false){if(_a<=_b){if(!this._select_noscroll&&_c&&_c._isEnable()){_c._set_rowpos(_a);}_d=this._getBodyBegRowPos(_a);}else if(_a>(_b+this.pagerowcount-1)){var _e=(this.pagerowcount>0)?this._pagerowcnt-this.pagerowcount:0;if(!this._select_noscroll&&_c&&_c._isEnable()){_c._set_rowpos(_a-this._pagerowcnt+1+_e);}_d=this._getBodyBegRowPos(_a);}else{if(this._isRemainAreaScroll()){if(!this._select_noscroll&&_c&&_c._isEnable()){_c._set_rowpos(_a);}_d=this._getBodyBegRowPos(_a);}}}return _d;};_pGrid._getBodyBegRowPos=function(_a){if(this._fixed_rowcnt>0){if(this._fixed_endrow>=_a){return this._fixed_startrow;}return this._begrowpos-(this._fixed_rowcnt-this._fixed_startrow);}return this._begrowpos;};_pGrid._clearRows=function(_a){if(_a.length>0){for(var _b=0;_b<_a.length;_b++ ){if(_a[_b]== -2){this._refreshSumm(true);bSummRowDraw=false;}else if(_a[_b]== -1){this._refreshHead(true);bHeadRowDraw=false;}else{this._refreshBodyRow(_a[_b]-this._getBodyBegRowPos(_a[_b]));}}return true;}return false;};_pGrid._selectDraw=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n){var _o=this._dsRowToDispRow(_i);var _p=this._dsRowToDispRow(_c);var _q=this._toprowpos[0];this._setSelectedInfo(null,null,_c,null,null);if(!this._is_created){return;}var _r=false;var _s=false;var _t=false;var _u=null;if((_u=this._getUseBindExprProp("body"))||this._isUseBindExprStyle("body")){_r=true;_l=true;}if(this._isUseBindExprStyle("head")||this._getUseBindExprProp("head")||_p== -1||_o== -1){_s=true;}if(this._isUseBindExprStyle("summ")||this._getUseBindExprProp("summ")||_p== -2||_o== -2){_t=true;}if(this._isSelectRowType()){if(_p<0&&(_n&&_n.indexOf("func")<0)){if(_l){if(!this._clearRows(_m)){this._refreshBody(true,true);}}else{this._refreshBodyRow(_o-this._getBodyBegRowPos(_o));}if(_s){this._refreshHead(true);}if(_t){this._refreshSumm(true);}}else if(_p!=_o){this._jumpCurrentRow(_p);if(this._isMultiSelect()){this._refreshBody(true,true);if(_s){this._refreshHead(true);}if(_t){this._refreshSumm(true);}}else{if(_l){if(!this._clearRows(_m)){this._refreshBody(true,true);}else{this._refreshBodyRow(_p-this._getBodyBegRowPos(_p));}}else{this._refreshBodyRow(_o-this._getBodyBegRowPos(_o));this._refreshBodyRow(_p-this._getBodyBegRowPos(_p));}if(_s){this._refreshHead(true);}if(_t){this._refreshSumm(true);}}}else{if(this._isMultiSelect()){this._refreshBody(true,true);if(_s){this._refreshHead(true);}if(_t){this._refreshSumm(true);}}}}else{if(_p<0&&(_n&&_n.indexOf("func")<0)){if(_l){if(!this._clearRows(_m)){this._refreshBody(true,true);}}else{this._refreshBodyCell(_g,_o-this._getBodyBegRowPos(_o));}if(_s){this._refreshHead(true);}if(_t){this._refreshSumm(true);}}else if(_p!=_o||_a!=_g){if(_n!="selectorsizing"){this._jumpCurrentRow(_p);var _v;if(_p== -1){_v=this._getCurrentHeadCell( -1);}else if(_p== -2){_v=this._getCurrentSummCell( -1);}else{_v=this._getCurrentBodyCell( -1, -1);}if(_v){var _w=_v._refobj._area;var _x=this._select_ctrl;if(_x&&_x._is_tracking){if(_w=="body"){_v.parent._showfull(_v);}else if(_w=="left"){if(this.hscrollbar){this.hscrollbar.set_pos(0);}}else{var _y=this._getScollMaxLeft();if(this.hscrollbar){this.hscrollbar.set_pos(_y);}}}else if(!_n){_v.parent._showfull(_v);}else if(_n=="keydown"){_v._showfull(true);}}}if(this._isAreaSelect()){if(_n=="selectorsizing"){if(nexacro.OS=="Android"&&(nexacro.Browser=="Safari"||nexacro.Browser=="MobileSafari")){nexacro.OnceCallbackTimer.callonce(this,function(){this._refreshBody(true,true);},10);}else{this._refreshBody(true,true);}}else{this._refreshBody(true,true);if(_s){this._refreshHead(true);}if(_t){this._refreshSumm(true);}}}else{if(_l){this._clearRows(_m);this._refreshBody(true,true);}else{this._refreshBodyCell(_g,_o-this._getBodyBegRowPos(_o));this._refreshBodyCell(_a,_p-this._getBodyBegRowPos(_p));}if(_s){this._refreshHead(true);}if(_t){this._refreshSumm(true);}}}else{if(this._isAreaSelect()){if(_n=="selectorsizing"){if(nexacro.OS=="Android"&&(nexacro.Browser=="Safari"||nexacro.Browser=="MobileSafari")){nexacro.OnceCallbackTimer.callonce(this,function(){this._refreshBody(true,true);},10);}else{this._refreshBody(true,true);}}else{this._refreshBody(true,true);if(_s){this._refreshHead(true);}if(_t){this._refreshSumm(true);}}}else if(this._isMultiSelect()){if(_l){this._clearRows(_m);this._refreshBody(true,true);}else{this._refreshBodyCell(_a,_p-this._getBodyBegRowPos(_p));}if(_s){this._refreshHead(true);}if(_t){this._refreshSumm(true);}}}}this._updateSelector();};_pGrid._isUseBindExprStyle=function(_a){return this._is_use_bind_expr_style[_a];};_pGrid._isUseBindExprOuterStyle=function(_a){return this._is_use_bind_expr_outerstyle[_a];};_pGrid._getUseBindExprProp=function(_a){var _b;var _c;var _d=this._curFormat;if(_a=="summary"){_a="summ";}if(this._is_use_bind_expr_prop[_a]!==null){return this._is_use_bind_expr_prop[_a];}this._is_use_bind_expr_prop[_a]=undefined;if(_a=="body"){_b=this._bodyBand;_c=_d._bodycells;}else if(_a=="head"){_b=this._headBand;_c=_d._headcells;}else{_b=this._summBand;_c=_d._summcells;}if(_b){var _e;for(var _f=0;_f<_c.length;_f++ ){var _g=_c[_f];for(_e in _g){if(_g.hasOwnProperty(_e)){if(_a=="body"&&_e=="text"){continue;}if(_g[_e]&&_g[_e]._bindtype>0){if(this._is_use_bind_expr_prop[_a]==undefined){this._is_use_bind_expr_prop[_a]=[];}this._is_use_bind_expr_prop[_a].push(_f);break;}}}}}return this._is_use_bind_expr_prop[_a];};_pGrid._clearBindTypeFlag=function(){this._is_use_bind_expr_prop.body=null;this._is_use_bind_expr_prop.head=null;this._is_use_bind_expr_prop.summ=null;};_pGrid._toggleVal=function(_a,_b){if(!_b){return false;}var _c=_b._getValue(_a);_c=nexacro._toBoolean(_c);_c=(_c)?0:1;if(_b.text._bindtype==1){this._dsEventOccured=true;var _d=this._binddataset.setColumn(_a,_b.text._bindexpr,_c);if(nexacro._enableaccessibility){var _e=this._getAccessibilityCurrentCell();if(_e){_e._setAccessibilityStatChecked(nexacro._toBoolean(_c));}}this._dsEventOccured=false;return _d;}return false;};_pGrid._isEditorKeyAction=function(_a,_b,_c,_d,_e,_f){if(this._is_editor_keyaction==false){this._is_editor_keyaction=true;return true;}if(_a instanceof nexacro.InputElement||_a instanceof nexacro.TextAreaElement){if(_a.readonly==true){return false;}if(_c==nexacro.Event.KEY_LEFT){if(_e||_f||_d){return true;}var _g=_a.getElementCaretPos();if((_g&&_g!= -1)&&_g.begin!=0){return true;}}else if(_c==nexacro.Event.KEY_RIGHT){if(_e||_f||_d){return true;}var _g=_a.getElementCaretPos();var _h=_a.getElementValue();var _i=_h?_h.length:0;if((_g&&_g!= -1)&&_g.begin!=_i){return true;}}else if(_c==nexacro.Event.KEY_UP){if(_e||_f||_d){return true;}if(_a.usemultiline){var _j=_a.getCaretLine();if(_j!=1){return true;}}}else if(_c==nexacro.Event.KEY_DOWN){if(_e||_f||_d){return true;}if(_a.usemultiline){var _j=_a.getCaretLine();_b=_a.parent.linkedcontrol;var _k=parseInt(_b._getTextLine());if(_j!=_k){return true;}}}}return false;};_pGrid._getDlgCode=function(_a,_b,_c,_d){if(nexacro._enableaccessibility&&nexacro._accessibilitytype==5){this._accept_arrow=true;}return {want_tab:this._acceptstab,want_return:false,want_escape:false,want_chars:false,want_arrows:this._accept_arrow};};_pGrid._getFirstEditableCell=function(){var _a,_b;if(this._binddataset&&this._curFormat&&this._curFormat._bodycells){var _c=this._getGridRowCount();var _d=this._curFormat._bodycells.length;for(var _e=0;_e<_c;_e++ ){for(var _f=0;_f<_d;_f++ ){var _g=_e;if(this._hasTree){_g=this._treeIndexes[_g];}_b=this._curFormat._bodycells[_f]._getEdittype(_g);if(_b!==""&&_b!=="none"){return {row:_g,cell:_f};}}}}return {row:null,cell:null};};_pGrid._getLastEditableCell=function(){var _a,_b;if(this._binddataset){var _c=this._getGridRowCount();var _d=this._curFormat._bodycells.length;for(var _e=_c-1;_e>=0;_e-- ){for(var _f=_d-1;_f>=0;_f-- ){var _g=_e;if(this._hasTree){_g=this._treeIndexes[_g];}_b=this._curFormat._bodycells[_f]._getEdittype(_g);if(_b!==""&&_b!=="none"){return {row:_g,cell:_f};}}}}return {row:null,cell:null};};_pGrid._isChar=function(_a){switch(_a){case 9:case 25:case 27:case 144:case 145:return false;break;};if((_a>=16&&_a<=21)||(_a>=33&&_a<=40)||(_a>=91&&_a<=93)||(_a>=112&&_a<=123)){return false;}return true;};_pGrid._ReasonRefresh=null;_pGrid.on_apply_cell_pseudo=function(_a,_b){this._ReasonRefresh=1;_a._ReasonRefresh=1;if(this.enableredraw){if(this._isSelectRowType()){if(this.useselcolor==false&&_a._selected){if(this._mouseovercell&&(this._mouseovercell._rowidx==_a._rowidx)){_b="mouseover";}}if(_b=="mouseover"){this._refreshBodyRow(_a._getDisplayRowIdx(),_b,_a.enable);}else{_a._ReasonRefresh=null;_a._control_pseudo="";_a._contents_pseudo="";this._refreshBodyRow(_a._getDisplayRowIdx(),_b,_a.enable);}if(this._is_use_suppress){this._adjustOverlayElements(false,false);}}}_a._ReasonRefresh=null;this._ReasonRefresh=null;};_pGrid._setDSEventHandlers=function(_a){_a._setEventHandler("onload",this.on_dsnotify_onload,this);_a._setEventHandler("onrowposchanged",this.on_dsnotify_onrowposchanged,this);_a._setEventHandler("oncolumnchanged",this.on_dsnotify_oncolumnchanged,this);_a._setEventHandler("onrowsetchanged",this.on_dsnotify_onrowsetchanged,this);};_pGrid._removeDSEventHandlers=function(_a){_a._removeEventHandler("onload",this.on_dsnotify_onload,this);_a._removeEventHandler("onrowposchanged",this.on_dsnotify_onrowposchanged,this);_a._removeEventHandler("oncolumnchanged",this.on_dsnotify_oncolumnchanged,this);_a._removeEventHandler("onrowsetchanged",this.on_dsnotify_onrowsetchanged,this);};_pGrid._getBodyClientSize=function(){var _a=this._curFormat;var _b=0,_c=0,_d;_d=this._getAvailableRect(this);_c=_d.width;_b=_d.height;if(_a){if(!this._bodyBand){_d=this._getAvailableRect(this);_c=_d.width-_a.leftWidth-_a.rightWidth;_b=_d.height-this._getHeadHeight()-this._getSummHeight();}else{_d=this._getAvailableRect(this._bodyBand);_c=_d.width-_a.leftWidth-_a.rightWidth;_b=_d.height;}}return [_c,_b];};_pGrid._applyAutofittype=function(_a,_b){if(this.enableredraw==false){this._enable_redraw_history["autofit"]=[_a,_b];return;}var _c=this._curFormat;var _d=this.getElement();if(!_c||!_d){return;}var _e,_f;var _g=this._getBodyClientSize();_f=_g[0];_e=_g[1];if(!this._is_created&&(_f<=0||_e<=0)){_f=_d.client_width;_e=_d.client_height;}var _h=false;switch(this.autofittype){case "col":this._colautofit=true;this._rowautofit=false;break;case "row":this._colautofit=false;this._rowautofit=true;break;case "both":this._colautofit=true;this._rowautofit=true;break;case "allrow":this._colautofit=false;break;case "allboth":this._colautofit=true;break;case "col,allrow":this._colautofit=true;break;case "allpivot":this._colautofit=true;break;case "row,allpivot":this._colautofit=false;break;case "none":this._colautofit=false;this._rowautofit=false;_h=_b;break;}if(this._colautofit&&_f>=0){_h=_c._adjustColWidth(_f);}if(_h){if(_a){this._autofiting=true;if(this._bodyBand){var _i=this._bodyBand._scrollHeight;var _j=this._bodyBand._scrollWidth;if(this._colautofit){if(_f!=_j){this._setScrollMaxSize(_f,_i);this._bodyBand._scrollWidth=_f;}this._bodyBand._matrix._adjustColsDisplay(true);}else{this._setScrollMaxSize(_c.bodyWidth,_i);this._bodyBand._scrollWidth=_c.bodyWidth;this._bodyBand._matrix._adjustColsDisplay(true);}}if(this._headBand){this._headBand._matrix._adjustColsDisplay(true);}if(this._summBand){this._summBand._matrix._adjustColsDisplay(true);}this._autofiting=false;}this._applyResizer();return true;}return false;};_pGrid._resetColSizeList=function(_a){var _b=false;if(this.autofittype!="col"&&this.autofittype!="both"&&this.autofittype!="allboth"&&this.autofittype!="col,allrow"){var _c=this._curFormat;if(!_c){return false;}var _d=_c._cols,_e=_d.length;if(this.autosizingtype=="col"||this.autosizingtype=="both"){for(var _f=0;_f<_e;_f++ ){var _g=this._getMaxColDataSizeBand(_f,_a);if(_g>=0&&this._setColSize( -9,_f,_g,false,false,true,(_f!=_e-1))){_b=true;}}if(this.autofittype=="col"||this.autofittype=="both"||this.autofittype=="allboth"||this.autofittype=="col,allrow"){this._applyAutofittype(true);}}else{for(var _f=0;_f<_e;_f++ ){var _g=_d[_f].size;if(_g>=0&&this._setColSize( -9,_f,_g,false,false,true,(_f!=_e-1))){_b=true;}}}}return _b;};_pGrid.redraw=function(){if(!this.enableredraw){this._enable_redraw_history["recreate"]=true;return;}this._recreate();if(this._select_ctrl){this._select_ctrl._updateAll();}};_pGrid._getRowSizeInfo=function(_a){var _b=this._curFormat;var _c,_d=[];if(_a== -1){_c=this._rowHeadList[0];_d=this._rowHeadListSub;return {row_size:_c,subrow_sizes:_d};}else if(_a== -2){_c=this._rowSummList[0];_d=this._rowSummListSub;return {row_size:_c,subrow_sizes:_d};}else if(_a>=0){var _e=_b._bodyrows;var _f=_e.length;var _g=this._rowSizeListSub=[];var _h=this._rowSizeList=[];_c=_g[_a];for(var _i=0;_i<_f;_i++ ){_d[_i]=_h[_a*_f+_i];}return {row_size:_c,subrow_sizes:_d};}return null;};_pGrid._resetRowSizeList=function(_a){if(!this._curFormat){return;}if(!this._preloadImage()){return;}var _b=this._curFormat;if(_b._headrows){var _c=this._isUserChangeHeadRowSize;if(!_c){this._rowHeadListSub=[];this._rowHeadList=[];}var _d=0,_e=_b._headrows,_f=_e.length,_g=this._rowHeadListSub,_h=this._rowHeadList,_i;if(!(_c&&_h[0]>=0)){if(this._binddataset&&this._headAutoSize&&(this._autoSizeRowProc||this.autosizingtype=="row"||this.autosizingtype=="both")){for(var _j=0;_j<_f;_j++ ){_i=this._getMaxSubRowSize( -1,_j);_g[_j]=_i;_d+=_i;}}else{for(var _j=0;_j<_f;_j++ ){_i=_e[_j].size;_g[_j]=_i;_d+=_i;}}this._rowHeadList[0]=_d;}}if(_b._summrows){var _c=this._isUserChangeSummRowSize;if(!_c){this._rowSummListSub=[];this._rowSummList=[];}var _d=0,_e=_b._summrows,_f=_e.length,_k=this._rowSummListSub,_l=this._rowSummList,_i;if(!(_c&&_l[0]>=0)){if(this._binddataset&&this._summAutoSize&&(this._autoSizeRowProc||this.autosizingtype=="row"||this.autosizingtype=="both")){for(var _j=0;_j<_f;_j++ ){_i=this._getMaxSubRowSize( -2,_j);_k[_j]=_i;_d+=_i;}}else{for(var _j=0;_j<_f;_j++ ){_i=_e[_j].size;_k[_j]=_i;_d+=_i;}}this._rowSummList[0]=_d;}}if(_b._bodyrows){var _c=this._isUserChangeBodyRowSize;if(!_c&&!_a){this._rowSizeList=[];this._rowSizeListSub=[];}var _m=this._rowcount,_e=_b._bodyrows,_f=_e.length,_n=this._rowSizeListSub,_o=this._rowSizeList,_d,_i;if(this._binddataset&&this._bodyAutoSize&&(this._autoSizeRowProc||this.autosizingtype=="row"||this.autosizingtype=="both")){for(var _p=0;_p<_m;_p++ ){if(_c&&_o[_p]>=0){continue;}if(_a>=0&&_p<_a){continue;}_d=0;for(var _j=0;_j<_f;_j++ ){_i=this._getMaxSubRowSize(_p,_j);_n.push(_i);_d+=_i;}_o[_p]=_d;}this._is_variable_bodyrowsize=true;}else{for(var _p=0;_p<_m;_p++ ){if(_c&&_o[_p]>=0){continue;}_d=0;for(var _j=0;_j<_f;_j++ ){_i=_e[_j].size;_n.push(_i);_d+=_i;}_o[_p]=_d;}if(!_c){this._is_variable_bodyrowsize=false;}}}this._updateRowSizeExtend();};_pGrid._updateRowSizeExtendEx=function(_a,_b,_c,_d,_e){if(this.extendsizetype!="row"&&this.extendsizetype!="both"){if(!_a){return;}var _f=[];var _g=_a.length;for(var _h=0;_h<_g;_h++ ){_f[_h]=0;}var _i=_c.length;if(_d!=undefined){for(var _j=0;_j<_g;_j++ ){_f[_j]=_c[_d*_g+_j];}}else{for(var _j=0;_j<_i;){for(var _h=0;_h<_g;_h++ ){_f[_h]=Math.max(_f[_h],_c[_j]);_j++ ;}}}for(var _j=0;_j<_i;){for(var _h=0;_h<_g;_h++ ){_c[_j]=_f[_h];_j++ ;}}var _k=0;for(var _h=0;_h<_g;_h++ ){_k+=_f[_h];}var _l=_b.length;for(var _j=0;_j<_l;_j++ ){_b[_j]=_k;}}if(_e){this._resetFixSize();}};_pGrid._updateRowSizeExtend=function(){if(!this._binddataset||!this._curFormat){return;}if(this._headAutoSize){this._updateRowSizeExtendEx(this._curFormat._headrows,this._rowHeadList,this._rowHeadListSub);}if(this._summAutoSize){this._updateRowSizeExtendEx(this._curFormat._summrows,this._rowSummList,this._rowSummListSub);}if(this._bodyAutoSize){this._updateRowSizeExtendEx(this._curFormat._bodyrows,this._rowSizeList,this._rowSizeListSub,undefined,true);}};_pGrid._isChangeBodyColSizeList=function(_a,_b){if(this.autosizingtype!="both"&&this.autosizingtype!="col"){return false;}var _c=this._curFormat;if(!this._binddataset||!_c){return false;}var _d=_c._bodycells;var _e,_f,_g,_h=0;var _i=false;for(var _j=0;_j<_d.length;_j++ ){if(_d[_j].text._bindexpr==_a){_f=_d[_j]._col;_e=_c._cols[_f];_g=this._getMaxColDataSizeBand(_f);if(_e.size!=_g){_c._setColSize(_f,_g);_b[_h++ ]=_f;_i=true;}}}return _i;};_pGrid._isChangeBodyRowSizeList=function(_a){if(this._rowSizeEx==false&&this.autosizingtype!="both"&&this.autosizingtype!="row"){return false;}if(!this._binddataset||!this._curFormat){return false;}var _b=_a;var _c=this._curFormat._bodyrows;var _d;if(_c&&this._bodyAutoSize==true){_d=_c.length;for(var _e=0;_e<_d;_e++ ){var _f=(_b*_c.length)+_e;var _g=this._rowSizeListSub[_f];var _h=this._getMaxSubRowSize(_b,_e);if(_g!=_h){return true;}}}_c=this._curFormat._headrows;if(_c&&this._headAutoSize==true){_d=_c.length;for(var _e=0;_e<_d;_e++ ){var _g=this._rowHeadListSub[_e];var _h=this._getMaxSubRowSize( -1,_e);if(_g!=_h){return true;}}}_c=this._curFormat._summrows;if(_c&&this._summAutoSize==true){_d=_c.length;for(var _e=0;_e<_d;_e++ ){var _g=this._rowSummListSub[_e];var _h=this._getMaxSubRowSize( -2,_e);if(_g!=_h){return true;}}}return false;};_pGrid._updateBodyRowSizeList=function(_a){var _b=false;if(this._rowSizeEx==false||this._bodyAutoSize==false){return false;}if(!this._binddataset||!this._curFormat||!this._curFormat._bodyrows||this._curFormat._bodyrows.length==0){return false;}var _c=_a;var _d=this._curFormat._bodyrows;var _e=_d.length;for(var _f=0;_f<_e;_f++ ){var _g=(_c*_d.length)+_f;var _h=this._rowSizeListSub[_g];var _i=this._getMaxSubRowSize(_c,_f);if(_h!=_i){this._rowSizeListSub[_g]=_i;this._rowSizeList[_c]+=(_i-_h);_b=true;}}if(_b==true){this._updateRowSizeExtend();}return _b;};_pGrid._getGridRowCount=function(_a){if(_a&&this._bodyrowheight===0){return 0;}var _b=0;if(this._hasTree){if(this._treeIndexes){_b=this._treeIndexes.length;}}else{_b=this._rowcount;}return _b;};_pGrid._resetDisplayInfo=function(_a,_b){this.pagerowcount=0;this._pagerowcnt=0;this._disprowcnt=0;var _c=this._curFormat;if(!_c){return;}var _d=this._getBodyClientSize();var _e=_d[1];var _f=this._getGridRowCount();var _c=this._curFormat;this._bodyrowheight=_c._body_height;if(this._bodyrowheight>0){if(this._is_variable_bodyrowsize==false){var _c=this._curFormat;var _g=this._bodyrowheight;this.pagerowcount=Math.floor(_e/_g);this._pagerowcnt=Math.ceil(_e/_g);this._disprowcnt=this._pagerowcnt*_a;}else{var _h=(this.vscrollbar)?this.vscrollbar._pos:0;var _i=this._control_element.vscroll_limit;if(_h<0){_h=0;}else if(_h>_i){_h=_i;}var _j,_k,_l=this._getScreenTopRowPos(_h);var _m=0;if(_b){_j=_k=_l[0];_m=_l[1];}else{_j=_k=(_l[1]>0)?_l[0]+1:_l[0];}var _n=0;var _o;var _p=true;for(;_k<_f;_k++ ){_o=this._getDataRow(_k);_n+=this._rowSizeList[_o];if(_m>0){_n-=(this._rowSizeList[_o]-_m);_m=0;}if(_p){this._pagerowcnt++ ;}this._disprowcnt++ ;if(_n>=_e){_p=false;}if(_n>=_e*_a){break;}if(_p){this.pagerowcount++ ;}}if(_k==_f&&_n<_e){var _q=(this._fixed_endrow>=0)?this._fixed_endrow: -1;for(var _k=_j-1;_k>_q;_k-- ){_o=this._getDataRow(_k);_n+=this._rowSizeList[_o];if(_p){this._pagerowcnt++ ;}this._disprowcnt++ ;if(_n>=_e){_p=false;}if(_n>=_e*_a){break;}if(_p){this.pagerowcount++ ;}}}if(this._disprowcnt==0&&_l[1]>=_e){this._pagerowcnt=this.pagerowcount=this._disprowcnt=1;}}}};_pGrid._getMaxColSize=function(_a,_b,_c,_d,_e){var _f=0;var _g=_a.length;var _h,_i,_j;var _k=this._curFormat;var _l=0;var _m,_n;for(var _o=0;_o<_g;_o++ ){_m=_a[_o]._col;_n=_a[_o]._colspan;if(_m<=_b&&_m+_n>_b){_j=_a[_o]._subcells;if(_j.length>0){var _p=this._getMaxColSize(_j,_b-_m,_c,_b,_e);_f=Math.max(_f,_p);}else{if(_n>1){if(_m+_n-1!=_b){continue;}}if(!_d){_d=0;}var _q=0;if(this._hasTree){_q=this._getDepthWidth(_c,_a[_o]);}if(_q<0){return -1;}var _r=_a[_o]._getAttrValue(_a[_o].autosizecol,_c);var _s=_k._cols[_b+_d].orgsize;var _t;if(_r=="none"){_t=_s;}else{var _u=_a[_o]._getAttrValue(_a[_o].displaytype,_c);if(_u=="checkbox"){var _v=_a[_o]._query_pseudo_control(this,_c,"checkboxsize","buttonsize","normal");if(_v==null){_v=14;}else{_v=parseInt(_v._value,10);}_t=_v+6;}else{var _w=_a[_o]._getDisplayText(_c);if(_e&&_n==1){var _x=/\r\n|\n|\r/;var _y=_w.split(_x);var _z=_y.length;var _aa,_ab=0;for(var _ac=0;_ac<_z;_ac++ ){_aa=this._getByteLength_UTF8(_y[_ac]);_ab=Math.max(_ab,_aa);}if(_e.max>=_ab){continue;}_e.max=_ab;}_t=this._getCellRowTextSize(_a[_o],_c,_w);_t=_t[0];}var _ad=_a[_o]._curpadding,_ae=_a[_o]._curborder;if(_ad==="bindexpr"||_ad===undefined){_ad=_a[_o]._query_pseudo_padding(_c,"normal");}if(_ae==="bindexpr"||_ae===undefined){_ae=_a[_o]._query_pseudo_border(_c,false,"normal",0,null,null);}_t+=(_ad)?(_ad.left+_ad.right):0;_t+=(_ae&&_ae.bottom_width)?parseInt(_ae.bottom_width):0;_t+=_q;if(_r=="limitmin"){if(_t<_s){_t=_s;}}else if(_r=="limitmax"){if(_t>_s){_t=_s;}}if(_n>1){var _af=0;var _ag=_m,_ah=_m+_n-1;for(var _ac=_ag;_ac<_ah;_ac++ ){_af+=_k._cols[_ac+_d].size;}_t-=_af;}}_f=Math.max(_f,_t);}}}return _f+1;};_pGrid._getCellRowTextSize=function(_a,_b,_c){var _d=_a._curfont,_e=_a._curselfont;var _f=_a._getWordwrap(_b);var _g=[],_h,_i;if(_d===undefined){_d=_a._query_pseudo_font(_b,false,"normal");_h=nexacro._getTextSize2("A",_d);if(_a._curfont!=="bindexpr"){_a._cur1font_size=_h;}}else{if(_d==="bindexpr"){_d=_a._query_pseudo_font(_b,false,"normal");_h=nexacro._getTextSize2("A",_d);}else if(!(_h=_a._cur1font_size)){_h=nexacro._getTextSize2("A",_d);_a._cur1font_size=_h;}}if(_e===undefined){_e=_a._query_pseudo_font(_b,true,"normal");_i=nexacro._getTextSize2("A",_e);if(_a._curselfont!=="bindexpr"){_a._cur1selectfont_size=_i;}}else{if(_e==="bindexpr"){_e=_a._query_pseudo_font(_b,true,"normal");_i=nexacro._getTextSize2("A",_e);}else if(!(_i=_a._cur1selectfont_size)){_i=nexacro._getTextSize2("A",_e);_a._cur1selectfont_size=_i;}}var _j,_k;if(!_c){if(_h[0]<=_i[0]){_g=[].concat(_i);}else{_g=[].concat(_h);}_g[0]=1;return _g;}else{if(_h[0]<=_i[0]){_d=_e;_k=_i[0];_j=_i[1];}else{_k=_h[0];_j=_h[1];}}var _l=_a._getAttrValue(_a.displaytype,_b);if(_l=="image"){var _m="row"+_b;var _n=_a._imgWidthTemp[_m];var _o=_a._imgHeightTemp[_m];if(_n>0){_g[0]=_n;_g[1]=_o;}else{url=nexacro._getURIValue(_c);url=nexacro._getImageLocation(url,this._getRefFormBaseUrl());var _p=nexacro._getImageSize(url,this._on_sizeloading,this);if(_p){_g[0]=_p.width;_g[1]=_p.height;}else{_g[0]=1;_g[1]=_j;}}return _g;}else{var _q=true;if(this.autosizingtype=="col"||this.autosizingtype=="both"){_q=false;}if(_q&&(this._autoSizeRowProc||this._rowSizeEx)&&_f!="none"&&_f!=false&&_f!="false"){var _r=this._curFormat._cols;var _s=_r[_a._col+_a._colspan-1].right-_r[_a._col].left;var _t=_a._query_pseudo_padding(_b,"normal");var _u=_a._query_pseudo_border(_b,false,"normal",0,null,null);var _v=_a._query_pseudo_border(_b,true,"normal",0,null,null);_u=(_u.right_width<_v.right_width)?_v:_u;_s-=(_t.left+_t.right);_s-=_u.right_width?parseInt(_u.right_width):0;_g=nexacro._getTextSize2(_c,_d,true,_s,_f);}else{_g=nexacro._getTextSize2(_c,_d,true);}if(_g[1]<_j){_g[1]=_j;}return _g;}};_pGrid._getMaxSubRowSize=function(_a,_b,_c,_d){var _e=this._curFormat;var _f;if(_a== -2){if(!_c){_c=this._curFormat._summcells;};_f=_e._summrows;}else if(_a== -1){if(!_c){_c=this._curFormat._headcells;}_f=_e._headrows;}else{if(!_c){_c=this._curFormat._bodycells;}_f=_e._bodyrows;}var _g=this._curFormat._cols;if(!this._autoSizeRowProc&&this.autosizingtype!="row"&&this.autosizingtype!="both"){return _f[_b].size;}var _h=0;var _i=_c.length;var _j,_k,_l;for(var _m=0;_m<_i;_m++ ){_j=_c[_m]._row;_k=_c[_m]._rowspan;_l=_c[_m]._subcells;if(_j==_b||(_l.length>0&&_j<=_b&&(_j+_k)>_b)){var _n=0;var _o= -1;var _p=0;if(_l.length>0){_n=this._getMaxSubRowSize(_a,_b-_j,_l,_j);_h=Math.max(_h,_n);}else{if(!_d){_d=0;}var _q=_c[_m]._getAttrValue(_c[_m].autosizerow,_a);var _r=_f[_b+_d].size;var _s;if(_q=="none"){_s=_r;}else{var _t=_c[_m]._getDisplayText(_a);var _u=this._getCellRowTextSize(_c[_m],_a,_t);_s=_u[1];var _v=_u[0];var _w=1;var _x=_c[_m]._curpadding,_y=_c[_m]._curborder;if(_x==="bindexpr"||_x===undefined){_x=_c[_m]._query_pseudo_padding(_a,"normal");}if(_y==="bindexpr"||_y===undefined){_y=_c[_m]._query_pseudo_border(_a,false,"normal",0,null,null);}_s+=_x.top+_x.bottom;_s+=_y.bottom_width?parseInt(_y.bottom_width):0;if(_q=="limitmin"){if(_s<_r){_s=_r;}}else if(_q=="limitmax"){if(_s>_r){_s=_r;}}}_h=Math.max(_h,_s);}}}return _h;};_pGrid._getSubRowSizeList=function(_a){var _b=this._curFormat;var _c=_b._bodyrows;var _d=_c.length;var _e=[],_f=0;for(var _g=0;_g<_d;_g++ ){_e[_f++ ]=this._rowSizeListSub[_a*_d+_g];}return _e;};_pGrid._makeCssRefInfoCtrl=function(_a){_a._refcssobj=this;_a._refcssid="#"+_a.id;return this;};_pGrid._addFuncQueue=function(_a,_b,_c,_d){var _e={work:_a,pthis:_b,func:_c,args:_d};this._func_queue.push(_e);};_pGrid._exeFuncQueue=function(_a){var _b=this._func_queue;for(var _c=0;_c<_b.length;_c++ ){if(_b[_c].work==_a){_b[_c].func.call(_b[_c].pthis,_b[_c].args);this._func_queue.splice(_c,1);_c-- ;}}};_pGrid._addRefreshContents=function(_a,_b,_c){if(_b){var _d=this._recreate_contents_proc;if(_c){for(var _e=0;_e<_d.length;_e++ ){if(_d[_e].workname==_a){return false;}}}var _f={workname:_a,band:_b};_d.push(_f);return true;}};_pGrid._execRefreshContents=function(_a,_b,_c){var _d=this._recreate_contents_proc;if(_b&&_d.length>0){this._clearAllStyleCache();}for(var _e=0;_e<_d.length;_e++ ){if(_d[_e].workname==_a){_d[_e].band._recreate_contents(true,false,false,false,_c);this._recreate_contents_proc.splice(_e,1);_e-- ;}}};_pGrid._applyColSizing=function(_a,_b){if(this.enableredraw==false){return;}var _c=this.getElement();var _d=this._curFormat;if(_c&&_d&&_b>=0){var _e=this._headBand;var _f=_e._get_rows();var _g=_f[0]._cells[_b];var _h=_g._refobj;var _i=_h._col+(_h._colspan-1);var _j=_d._cols[_i]._area;if(_h._area!="right"){var _k=_d._cols[_i].left;var _l=_d._cols[_i].right+_a;if(_k>_l){var _m=_d._cols[_i+1];if((_m&&_m._area=="right")||_i==_d._cols.length-1){_a=_k-_d._cols[_i].right+7;}else{_a=_k-_d._cols[_i].right+1;}}}else{var _n=_d._cols[_i].right;var _o=_d._cols[_i].left+_a;if(_n<_o){_a=_n-_d._cols[_i].left-1;}_a=0-_a;}var _p=_d._cols[_i].size;var _q=_d._adjustColSizing(_i,_a);var _r=_d._cols[_i].size;if(_q){this._updateColSize(_i);this._addFuncQueue("colsizing",this,this.on_fire_oncolresized,[_i, -9,_r,_p,_i]);}}};_pGrid._applyRowSizing=function(_a,_b){if(this.enableredraw==false){return;}var _c=this.getElement();var _d,_e,_f;var _g=this._curFormat;if(_g&&_c&&_b>=0){var _h=this._resizerRowRange[_b];var _i=_h.area,_j;var _k=this._getDataRow(_h.row);var _l=_h.cellinfo._row+_h.cellinfo._rowspan-1;var _m=false;if(_i=="head"){_e=this._rowHeadListSub[_l];_j=_e+_a;_j=Math.max(_j,5);_j=Math.min(_j,this._client_height-5);_f=_j;var _n=this.enableredraw;this.enableredraw=false;this.setRealRowSize( -1,_l,_j,true);this.enableredraw=_n;_d=_l;if(_a){this._resizeBand();this._addRefreshContents("rowsizing",this._headBand);_m=true;}}else if(_i=="body"){_e=this._rowSizeListSub[_k*_g._bodyrows.length+_l];_j=_e+_a;var _o,_p;if(_k==this._rowcount-1){_p=7;}else{_p=1;}_o=_j-_p;if(_o<0){_j=_p;_a-=_o;}_f=_j;if(this._getFixRowCnt()>_k){this._fixed_height+=_a;this._fixedrow_height+=_a;}var _n=this.enableredraw;this.enableredraw=false;this.setRealRowSize(_k,_l,_j,true);this.enableredraw=_n;_d=_l+((_g._headrows)?_g._headrows.length:0);if(_a){if(this.extendsizetype!="row"&&this.extendsizetype!="both"){this._addRefreshContents("rowsizing",this._bodyBand);}else{this._updateRowSize(_k,_l);}_m=true;}}else if(_i=="summ"){_e=this._rowSummListSub[_l];if(this.summarytype=="top"||this.summarytype=="lefttop"){_j=_e+_a;}else{_j=_e-_a;}_j=Math.max(_j,5);_j=Math.min(_j,this._client_height-5);_f=_j;var _n=this.enableredraw;this.enableredraw=false;this.setRealRowSize( -2,_l,_j,true);this.enableredraw=_n;_d=_l+((_g._headrows)?_g._headrows.length:0)+((_g._bodyrows)?_g._bodyrows.length:0);if(_a){this._resizeBand();this._addRefreshContents("rowsizing",this._summBand);_m=true;}}if(_m){this._addFuncQueue("rowsizing",this,this.on_fire_onrowresized,[_d,_k,_f,_e,_l]);}}};_pGrid._no_update_bandrect=false;_pGrid._updateColSize=function(_a){var _b=false;if(this.autosizingtype=="row"||this.autosizingtype=="both"){this._resetRowSizeList();var _c=this._no_update_bandrect;this._no_update_bandrect=true;this._resizeBand();this._no_update_bandrect=_c;_b=true;_a=null;}this._applyAutofittype(true);if(this._headBand){this._headBand._matrix._adjustColsDisplay(true,false,_a);this._headBand._matrix._adjustRowsDisplay(_b);}if(this._summBand){this._summBand._matrix._adjustColsDisplay(true,false,_a);this._summBand._matrix._adjustRowsDisplay(_b);}if(this._bodyBand){var _d=this._getScrollTop();if(_d<0){_d=0;}this._last_scroll_top=_d;this._toprowpos=this._getScreenTopRowPos(_d);this._bottomrowpos=this._getScreenBottomRowPos(_d);this._bodyBand._matrix._adjustColsDisplay(true,false,_a);this._bodyBand._matrix._adjustRowsDisplay(_b);this._bodyBand._update_rows=this._bodyBand._matrix._adjustScrollRows(_d,true);this._bodyBand._on_refresh_rows(false,true);}};_pGrid._updateRowSize=function(_a,_b,_c){if(this.extendsizetype!="row"&&this.extendsizetype!="both"){return;}var _d=this._curFormat;if(_a== -1){if(!this._headBand){return false;}var _e=this._headBand._get_rows()[0];var _f=this._rowHeadList[0];var _g=this._rowHeadListSub[_b];_e.set_height(_f);_e._init(_d);var _h=_e._cells;for(var _i=0;_i<_h.length;_i++ ){if(_h[_i]._refobj._row<=_b&&_b<_h[_i]._refobj._row+_h[_i]._refobj._rowspan){if(_h[_i]._refobj._row<_b){for(var _j=_h[_i]._refobj._row;_j<_b;_j++ ){_g+=this._rowHeadListSub[_j];}}if(_h[_i]._refobj._rowspan>1){for(var _j=_b+1;_j<_h[_i]._refobj._row+_h[_i]._refobj._rowspan;_j++ ){_g+=this._rowHeadListSub[_j];}}_h[_i].set_height(_g);}}this._resizeBand();if(this._bodyBand&&!_c){this._bodyBand._matrix._adjustRowsDisplay();this._bodyBand._matrix._adjustColsDisplay();this._bodyBand._on_refresh_rows(false,false);}}else if(_a== -2){if(!this._summBand){return false;}var _e=this._summBand._get_rows()[0];var _f=this._rowSummList[0];var _g=this._rowSummListSub[_b];var _k=_d._summrows.length;_e.set_height(_f);_e._init(_d);var _h=_e._cells;for(var _i=0;_i<_h.length;_i++ ){if(_h[_i]._refobj._row<=_b&&_b<_h[_i]._refobj._row+_h[_i]._refobj._rowspan){if(_h[_i]._refobj._row<_b){for(var _j=_h[_i]._refobj._row;_j<_b;_j++ ){_g+=this._rowSummListSub[_j];}}if(_h[_i]._refobj._rowspan>1){for(var _j=_b+1;_j<_h[_i]._refobj._row+_h[_i]._refobj._rowspan;_j++ ){_g+=this._rowSummListSub[_j];}}_h[_i].set_height(_g);}}this._resizeBand();if(this._bodyBand&&!_c){this._bodyBand._matrix._adjustRowsDisplay();this._bodyBand._matrix._adjustColsDisplay();this._bodyBand._on_refresh_rows(false,false);}}else if(_a>=0){if(!this._bodyBand){return false;}var _l=this._bodyBand._get_rows();var _e;for(var _m=0;_m<_l.length;_m++ ){if(_l[_m]._rowidx==_a){_e=_l[_m];break;}}if(!_e){return false;}_e._init(_d);this._bodyBand._control_element._setFixArea(this._fixed_height);this._bodyBand._client_height=this._bodyBand._control_element.client_height;var _n=this._getDataRow(_a);var _f=this._rowSizeList[_n];var _o=this._curFormat._bodyrows.length;var _g=this._rowSizeListSub[_n*_o+_b];_e.set_height(_f);var _h=_e._cells;for(var _i=0;_i<_h.length;_i++ ){if(_h[_i]._refobj._row<=_b&&_b<_h[_i]._refobj._row+_h[_i]._refobj._rowspan){if(_h[_i]._refobj._row<_b){for(var _j=_h[_i]._refobj._row;_j<_b;_j++ ){_g+=this._rowSizeListSub[_n*_o+_j];}}if(_h[_i]._refobj._rowspan>1){for(var _j=_b+1;_j<_h[_i]._refobj._row+_h[_i]._refobj._rowspan;_j++ ){_g+=this._rowSizeListSub[_n*_o+_j];}}_h[_i].set_height(_g);}}var _p=this._getScrollTop();if(_p<0){_p=0;}if(!_c){this._last_scroll_top=_p;this._toprowpos=this._getScreenTopRowPos(_p);this._bottomrowpos=this._getScreenBottomRowPos(_p);this._bodyBand._matrix._adjustRowsDisplay(true);this._bodyBand._matrix._adjustColsDisplay();this._bodyBand._update_rows=this._bodyBand._matrix._adjustScrollRows(_p,true);this._bodyBand._on_refresh_rows(false,false);}}else{return false;}return true;};_pGrid._applyResizer=function(){if(this.cellsizingtype=="col"||this.cellsizingtype=="both"){var _a=this._headBand;if(_a==null){return;}var _b=_a._get_rows();if(_b.length==0){return;}var _c=_b[0]._cells.length;var _d,_e,_f,_g;var _h,_i,_j,_k;var _l=this._resizerColRange=[];var _m={};var _n=0;var _o=this._resizer_colctrl;var _p=this._curFormat;if(_o){_o.destroy();delete _o;}_o=new nexacro.GridControlResizer("resizertrack","absolute",0,0,0,0,null,null,this);_o._setDirection("horizon");_o._setTracksize(this._client_height);_o._setCallbackFn(this._applyColSizing);_o.createComponent();this._resizer_colctrl=_o;for(var _q=0;_q<_c;_q++ ){_h=_b[0]._cells[_q];if(!_h){break;}_j=_h._refobj;_k=_h._setPositionInGrid(null,true,true);_g=_k.height;_i=_h.on_find_CurrentStyle_border(_h._pseudo);if(_j._area=="left"||_j._area=="body"){_f=_i?_i._right_width:0;_d=_k.left+_h._adjust_width-_f-4;}else{_f=_i?_i._left_width:0;_d=_k.left-2;}_m={left:_d,top:_k.top,right:_d+_f+6,bottom:_k.top+_g,index:_h._cellidx,area:_j._area};switch(this.cellsizebandtype){case "body":if(_j._area=="body"){_l[_n++ ]=_m;}break;case "allband":case "nohead":_l[_n++ ]=_m;break;case "noleft":case "nohead,noleft":if(_j._area!="left"){_l[_n++ ]=_m;}break;}}}else{var _o=this._resizer_colctrl;if(_o){_o.destroy();this._resizer_colctrl=null;this._resizerColRange=[];}}if(this.cellsizingtype=="row"||this.cellsizingtype=="both"){var _r=this._headBand;var _s=this._bodyBand;var _t=this._summBand;var _b,_h,_i,_j,_k;if(!_r&&!_s&&!_t){return;}var _l=this._resizerRowRange=[];var _m={};var _n=0;var _u=this._resizer_rowctrl;if(_u){_u.destroy();delete _u;}_u=new nexacro.GridControlResizer("resizertrack","absolute",0,0,0,0,null,null,this);_u._setDirection("vertical");_u._setTracksize(this._client_width);_u._setCallbackFn(this._applyRowSizing);_u.createComponent();this._resizer_rowctrl=_u;while(_r){if(this.cellsizebandtype=="body"||this.cellsizebandtype=="nohead"||this.cellsizebandtype=="nohead,noleft"){break;}_b=_r._get_rows();if(!_b.length){break;}var _v=_b[0]._cells.length;for(var _w=0;_w<_v;_w++ ){_h=_b[0]._cells[_w];_j=_h._refobj;_k=_h._setPositionInGrid(null,true,true);_f=_h._adjust_width;_i=_h.on_find_CurrentStyle_border(_h._pseudo);_g=_i?_i._bottom_width:0;_e=_k.top+_h._adjust_height-_g-4;_m={left:_k.left,top:_e,right:_k.left+_f,bottom:_e+_g+6,index:_n,area:"head",row:_h._rowidx,cellinfo:_j};_l[_n++ ]=_m;}break;}if(_s){_b=_s._get_rows();var _x=_b.length;var _v=_x>0?_b[0]._cells.length:0;for(var _w=0;_w<_x;_w++ ){for(var _q=0;_q<_v;_q++ ){_h=_b[_w]._cells[_q];_j=_h._refobj;_k=_h._setPositionInGrid(null,true,true);_f=_h._adjust_width;_i=_h.on_find_CurrentStyle_border(_h._pseudo);_g=_i?_i._bottom_width:0;_e=_k.top+_h._adjust_height-_g-4;_m={left:_k.left,top:_e,right:_k.left+_f,bottom:_e+_g+6,index:_n,area:"body",row:_h._rowidx,cellinfo:_j};_l[_n++ ]=_m;}}}while(_t){if(this.cellsizebandtype=="body"){break;}_b=_t._get_rows();if(!_b.length){break;}var _v=_b[0]._cells.length;for(var _w=0;_w<_v;_w++ ){_h=_b[0]._cells[_w];_j=_h._refobj;_k=_h._setPositionInGrid(null,true,true);_f=_h._adjust_width;_i=_h.on_find_CurrentStyle_border(_h._pseudo);if(this.summarytype=="top"||this.summarytype=="lefttop"){_g=_i?_i._bottom_width:0;_e=_k.top+_h._adjust_height-_g-4;}else{_g=_i?_i._top_width:0;_e=_k.top-2;}_m={left:_k.left,top:_e,right:_k.left+_f,bottom:_e+_g+6,index:_n,area:"summ",row:_h._rowidx,cellinfo:_j};_l[_n++ ]=_m;}break;}}else{var _u=this._resizer_rowctrl;if(_u){_u.destroy();this._resizer_rowctrl=null;this._resizerRowRange=[];}}};_pGrid._isAreaSelect=function(){if(this.selecttype=="area"||this.selecttype=="multiarea"){return true;}return false;};_pGrid._isSelectRowType=function(){if(this.selecttype=="row"||this.selecttype=="multirow"){return true;}return false;};_pGrid._isMultiSelect=function(){if(this.selecttype=="multirow"||this.selecttype=="multicell"||this.selecttype=="multitreecell"||this.selecttype=="multiarea"){return true;}return false;};_pGrid._setColSize=function(_a,_b,_c,_d,_e,_f,_g){var _h=this._curFormat;var _i=this._getColFixCnt("left");var _j=this._getColFixCnt("body");var _k=this._getColFixCnt("right");var _l=_h._cols;var _m=_l.length;var _n="body";if(_a== -1){_n="left";}else if(_a== -2){_n="right";}if(_d==true||_a>= -2){if(_n=="body"&&_b>=0){_b+=_i;}else if(_n=="right"){_b+=_i;_b+=_j;}}var _o=false;if(_b== -1){var _p;for(var _q=0;_q<_m;_q++ ){if(_f){if(_l[_q]._area=="left"&&this._AutoSizeLcol==false){continue;}if(_l[_q]._area=="right"&&this._AutoSizeRcol==false){continue;}}_p=_h.setFormatColProperty(_q,"size",_c);if(_p){_o=_p;}}}else{while(true){if(_f){if(_l[_b]._area=="left"&&this._AutoSizeLcol==false){break;}if(_l[_b]._area=="right"&&this._AutoSizeRcol==false){break;}}_o=_h._setColSize(_b,_c,_g);break;}}if(_e&&_o){this._recreate_contents_all(true,true,false);}return _o;};_pGrid._getLastRowBand=function(){var _a=this._curFormat;var _b="body";if(this.summarytype=="top"||this.summarytype=="lefttop"){if(_a._headrows&&_a._headrows.length){_b="head";}if(_a._summrows&&_a._summrows.length){_b="summ";}if(_a._bodyrows&&_a._bodyrows.length){_b="body";}}else{if(_a._headrows&&_a._headrows.length){_b="head";}if(_a._bodyrows&&_a._bodyrows.length){_b="body";}if(_a._summrows&&_a._summrows.length){_b="summ";}}return _b;};_pGrid._getDispRowCnt=function(){if(this._bodyBand){return this._bodyBand._get_rows().length;}return 0;};_pGrid._getScreenBottomRowPos=function(_a){if(!this._is_use_suppress){return -1;}var _b=this._bodyBand;var _c=(_a!=null)?_a:this._getScrollTop();var _d= -1;var _e=0;var _f=this._getGridRowCount();var _g=this._getAvailableRect(_b).height;for(var _h=0;_h<_f;_h++ ){if(_h<=this._fixed_endrow){continue;}_e+=this._getRowSize(_h);if(_e>=_c+_g){_d=_h;break;}}return _d;};_pGrid._getScreenTopRowPos=function(_a){var _b=this._bodyBand;var _c=(_a!=null)?_a:this._getScrollTop();var _d=0;var _e=0;var _f=this._getGridRowCount();var _g=0;var _h=false;for(var _i=0;_i<_f;_i++ ){if(_i<=this._fixed_endrow){continue;}if(_e>_c){_d=_i-1;_g=_e-_c;_h=true;break;}_e+=this._getRowSize(_i);}if(!_h){if(_b._client_height<_e){if(_e>_c){_d=_i-1;_g=_e-_c;}}else{_d=this._getFixRowCnt();_g=0;}}return [_d,_g];};_pGrid._isRemainAreaScroll=function(){var _a=this._bodyBand;var _b=_a._get_rows();if(_b.length==0){return false;}var _c=this._getScrollTop();var _d=0;var _e=_b.length;var _f=_b[_e-1];var _g=this._getGridRowCount()-1;if(_f._rowidx!=_g){return false;}var _h=this._getBodyClientSize()[1];var _i=0;for(var _j=_b.length-1;_j>=0;_j-- ){_i=_b[_j]._rowidx;_d+=this._getRowSize(_i);if(_d>=_h){break;}}_c-=_b[0]._adjust_top;for(var _j=0;_j<_e;_j++ ){if(_d==_c){return false;}else if(_d>_c){if(_i==_b[_j]._rowidx-1){return true;}else{return false;}}_d+=this._getRowSize(_b[_j]._rowidx);}return false;};_pGrid._getScollMaxLeft=function(){return this._control_element.hscroll_limit;};_pGrid._getScrollLeft=function(){return this._control_element.scroll_left;};_pGrid._getScrollTop=function(){return this._control_element.scroll_top;};_pGrid._getDataRow=function(_a){if(_a>=this._rowcount){return -9;}if(this._hasTree&&_a>=0){_a=this._treeIndexes[_a];if(_a==undefined){_a= -9;}}return _a;};_pGrid._getGridRow=function(_a){if(this._hasTree&&_a>=0){var _b=this._treeIndexes;var _c=_b.length;for(var _d=0;_d<_c;_d++ ){if(_b[_d]==_a){return _d;}}return -9;}return _a;};_pGrid._refreshCol=function(_a,_b,_c){if(!this.enableredraw){this._enable_redraw_history["refreshall"]=true;return;}if(!this.getElement()){return;}var _d=this._headBand;if(_d&&(!_c||_c=="head")){var _f=_d._get_rows()[0];var _g=_f.length;for(var _h=0;_h<_g;_h++ ){var _i=_f[_h];if(_i&&_i._refobj._col==_a){if(_b){_i.currentstyle._empty();}_i._updateAll();}}}_d=this._summBand;if(_d&&(!_c||_c=="summ")){var _f=_d._get_rows()[0];var _g=_f.length;for(var _h=0;_h<_g;_h++ ){var _i=_f[_h];if(_i&&_i._refobj._col==_a){if(_b){_i.currentstyle._empty();}_i._updateAll();}}}_d=this._bodyBand;var _e=_d._get_rows();if(_d&&_e.length&&(!_c||_c=="body")){var _f=_e[0]._cells;var _g=_f.length;for(var _h=0;_h<_g;_h++ ){var _i=_f[_h];if(_i&&_i._refobj._col==_a){for(var _j=0;_j=0){this._refreshBodyCell(_b,_c,_d);}else{for(var _g=0;_g0&&_d._bodycells){if(!this._preloadTreeImage()){return -1;}if(!this._preloadImage()){return -1;}var _g=_d._bodycells;var _h=_g.length;var _i=[];var _j;var _k={max: -1};var _l,_m,_n,_o;var _p,_q,_r,_s;for(var _t=0;_t<_h;_t++ ){_p=_g[_t];if(_p._col<=_a&&(_p._col+_p._colspan)>_a){if(_p!=_q){_i.push(_p);}_q=_p;if(_p._subcells.length){_r=_p._subcells;for(var _u=0;_u<_r.length;_u++ ){if(_p._col+_r[_u]._col<=_a&&(_p._col+_r[_u]._col+_r._colspan)>_a){_p=_r[_u];break;}}}if(_k){if(_p._curfont===undefined){_p._query_pseudo_font(0,false,"normal");}if(_p._curselfont===undefined){_p._query_pseudo_font(0,true,"normal");}if(_p._curborder===undefined){_p._query_pseudo_border(0,false,"normal",0,null,null);}if(_p._curpadding===undefined){_p._query_pseudo_padding(0,"normal");}if(_p._curfont==="bindexpr"||_p._curselfont==="bindexpr"||_p._curborder==="bindexpr"||_p._curpadding==="bindexpr"){_k=null;continue;}else if(_l!==undefined){if((_l!=_p._curfont)||(_m!=_p._curselfont)||(_n!=_p._curborder)||(_o!=_p._curpadding)){_k=null;continue;}}_l=_p._curfont;_m=_p._curselfont;_n=_p._curborder;_o=_p._curpadding;}}}for(var _u=0;_u<_f;_u++ ){var _v=this._getDataRow(_u);if(_b>=0&&_u<_b){_e=_d._cols[_a].size;continue;}_j=this._getMaxColSize(_i,_a,_v,null,_k);if(_j<0){return -1;}_e=Math.max(_e,_j);}}}_c=Math.max(_c,_e);}if(this._headAutoSize&&_d._headcells){var _g=_d._headcells;var _h=_g.length;var _e;var _i=[],_p;for(var _t=0;_t<_h;_t++ ){_p=_g[_t];if(_p._col<=_a&&(_p._col+_p._colspan)>_a){_i.push(_p);}}_e=this._getMaxColSize(_i,_a, -1);_c=Math.max(_c,_e);}if(this._summAutoSize&&_d._summcells){var _g=_d._summcells;var _h=_g.length;var _e;var _i=[],_p;for(var _t=0;_t<_h;_t++ ){_p=_g[_t];if(_p._col<=_a&&(_p._col+_p._colspan)>_a){_i.push(_p);}}_e=this._getMaxColSize(_i,_a, -2);_c=Math.max(_c,_e);}return _c;};_pGrid._on_treeloadImagetemp=function(_a,_b,_c){};_pGrid._tree_recreate=false;_pGrid._hasTree=false;_pGrid._treeIndexes=null;_pGrid._treeStates=null;_pGrid._treeChecked=null;_pGrid._treeCellinfo=null;_pGrid._hasSameNextNode=null;_pGrid._maxdepth=0;_pGrid._rootlevel=99;_pGrid._treeInitStatus={"collapse,null":0,"expand,null":1,"collapse,all":2,"expand,all":3};_pGrid._currentCellEditor=null;_pGrid._tempEditor=null;_pGrid._currentCellCell= -1;_pGrid._currentCellRow= -1;_pGrid._showEditing=false;_pGrid._beforeEditRowIdx= -1;_pGrid._beforeEditCellIdx= -1;_pGrid._onceTime_focus=false;_pGrid._set_focus_dir= -1;_pGrid._showEditorFocus=false;_pGrid._on_treeloadImage=function(_a,_b,_c){var _d=this._tree_load_all;_d[_a]=true;var _e,_f=true;for(_e in _d){if(_d.hasOwnProperty(_e)){if(_d[_e]==false){_f=false;break;}}}if(_f){if(this._is_created){this._recreate_contents_all(true,true,true);}else{this._tree_recreate=true;}}else{if(this._is_created){if(this._resetColSizeList()){this._bodyBand._matrix._adjustColsDisplay(true);}}}};_pGrid._on_sizeloading=function(_a,_b,_c){var _d=this._image_load_all;if(_d[_a]){return;}_d[_a]=true;var _e,_f=true;for(_e in _d){if(_d.hasOwnProperty(_e)){if(_d[_e]==false){_f=false;break;}}}if(_f){if(this._is_created){this._recreate_contents_all(true,true,true);}else{this._image_recreate=true;}}else{if(this._is_created){if(this._resetColSizeList()){this._bodyBand._matrix._adjustColsDisplay(true);}}}};_pGrid._preloadTreeImage=function(){if(this._tree_load_all!=null){return true;}if(!this._binddataset){return true;}var _a=this._binddataset.getRowCount();var _b=this._curFormat._bodycells;var _c,_d,_e,_f;this._tree_load_all={};for(var _j=0;_j<_a;_j++ ){for(var _k=0;_k<_b.length;_k++ ){_e=_b[_k];_d=_e._getDisplaytype(_j);if(_d!="tree"){continue;}_c=this._treeStates[_j];if(_c==0){_f="treecollapseimage";}else if(_c==1){_f="treeexpandimage";}else if(_c==2){_f="treeitemimage";}var _l=_e._query_pseudo_treecontrol(_j,_f,"normal");if(_l){if(_l.substring(0,4).toLowerCase()=="url("){_l=_l.substring(5,_l.length-2);}_l=nexacro._getImageLocation(_l,this._getRefFormBaseUrl());this._tree_load_all[_l]=false;}_f="";if(_c==0){_f+="treeopenbuttonimage";}else if(_c==1){_f+="treeclosebuttonimage";}if(_f){var _l=_e._query_pseudo_treecontrol(_j,_f,"normal");if(_l){if(_l.substring(0,4).toLowerCase()=="url("){_l=_l.substring(5,_l.length-2);}_l=nexacro._getImageLocation(_l,this._getRefFormBaseUrl());this._tree_load_all[_l]=false;}}}}var _g,_h=true,_i;for(_g in this._tree_load_all){if(this._tree_load_all.hasOwnProperty(_g)){_i=nexacro._getImageSize(_g,this._on_treeloadImage,this);if(!_i){_h=false;}}}return _h;};_pGrid._preloadImage=function(){if(this._image_load_all!=null){return true;}if(!this._binddataset){return true;}var _a=this._binddataset.getRowCount();var _b=this._curFormat._bodycells;var _c,_d;if(!_b){return true;}this._image_load_all={};for(var _h=0;_h<_a;_h++ ){for(var _i=0;_i<_b.length;_i++ ){_d=_b[_i];_c=_d._getDisplaytype(_h);if(_c!="image"){continue;}prop="text";var _j=_d._getDisplayText_image(_h);if(_j){if(_j.substring(0,4).toLowerCase()=="url("){_j=_j.substring(5,_j.length-2);}_j=nexacro._getImageLocation(_j,this._getRefFormBaseUrl());this._image_load_all[_j]=false;}}}var _e,_f=true,_g;for(_e in this._image_load_all){if(this._image_load_all.hasOwnProperty(_e)){_g=nexacro._getImageSize(_e,this._on_sizeloading,this);if(!_g){_f=false;}}}return _f;};_pGrid._getDepthWidth=function(_a,_b){var _c=_b._getDisplaytype(_a);if(_c!="tree"){return 0;}var _d=_b._getTreeStartLevel(_a);var _e=_b._getTreeLevel(_a);var _f=this._treeStates[_a];var _g=22;var _h=6;var _i=9;var _j=14;var _k=14;var _l=14;var _m,_n,_o;var _p;var _q="normal";if(_f==0){_p="treecollapseimage";}else if(_f==1){_p="treeexpandimage";}else if(_f==2){_p="treeitemimage";}var _r=_b._query_pseudo_treecontrol(_a,_p,_q);if(_r){if(_r.substring(0,4).toLowerCase()=="url("){_r=_r.substring(5,_r.length-2);}_r=nexacro._getImageLocation(_r,this._getRefFormBaseUrl());var _t=nexacro._getImageSize(_r,this._on_treeloadImagetemp,this);if(_t){_j=_t.width;}}_p="";if(_f==0){_p+="treeopenbuttonimage";}else if(_f==1){_p+="treeclosebuttonimage";}if(_p){var _r=_b._query_pseudo_treecontrol(_a,_p,_q);if(_r){if(_r.substring(0,4).toLowerCase()=="url("){_r=_r.substring(5,_r.length-2);}_r=nexacro._getImageLocation(_r,this._getRefFormBaseUrl());var _t=nexacro._getImageSize(_r,this._on_treeloadImagetemp,this);if(_t){_k=_t.width;}}}_e-=_d;if(_e<0){_e= -1;}var _s=(_e*_g)+_i;if(this.treeusebutton!="no"){_s+=_k;}else{_s+=_i;}if(this.treeusecheckbox==true){var _u=_b._query_pseudo_control(this,_a,"checkboxsize","buttonsize",_q);if(_u==null){checkWidth=14;}else{checkWidth=parseInt(_u._value,10);}_s+=checkWidth;}if(this.treeuseimage==true){_s+=1;if(_j>0){_s+=_j;}else{_s+=15;}_s+=5;}else{_s+=4;}return _s+2;};_pGrid._isPassPrevCell=function(_a,_b,_c,_d){var _e=_a.endsubrow.length;var _f=_a.begsubrow;var _g=_a.endsubrow;var _h=_a.begcol;var _i=_a.endcol;var _j=_b.length;if(_c=="next"||_c=="prev"){for(var _k=0;_k<_e;_k++ ){for(var _l=0;_l<_j;_l++ ){if(_f[_k]<=_b[_l]._row&&_g[_k]>=_b[_l]._row){if(_b[_l]._colspan>1){if(_c=="next"&&_b[_l]._col<_d&&_d<_b[_l]._col+_b[_l]._colspan){return true;}else if(_c=="prev"&&_b[_l]._col<=_d&&_d<_b[_l]._col+_b[_l]._colspan-1){return true;}}}}}}else{for(var _k=0;_k<_b.length;_k++ ){if(_h<=_b[_k]._col&&_i>=_b[_k]._col){if(_b[_k]._rowspan>1){if(_c=="down"&&_b[_k]._row<_d&&_d<_b[_k]._row+_b[_k]._rowspan){return true;}else if(_c=="up"&&_b[_k]._row<=_d&&_d<_b[_k]._row+_b[_k]._rowspan-1){return true;}}}}}return false;};_pGrid._getAreaMoveCell=function(_a,_b,_c){var _d=this._selectinfo;if(_d.area.length==0){return true;}var _e=_d.area[_d.area.length-1];var _f=this._curFormat._bodycells;if(_a=="next"){if(_d.ctrlpoint.col<_b){if(_e.endcol>=_b){return false;}}else{if(this._isPassPrevCell(_e,_f,_a,_b)){return false;}}}else if(_a=="prev"){if(_d.ctrlpoint.col>_b){if(_e.begcol<=_b){return false;}}else{if(this._isPassPrevCell(_e,_f,_a,_b)){return false;}}}else if(_a=="down"){if(_d.ctrlpoint.row<_c||(_d.ctrlpoint.row==_c&&_d.ctrlpoint.subrow<_b)){if(_e.endsubrow.length==(_c-_d.ctrlpoint.row+1)){if(_e.endsubrow[_e.endsubrow.length-1]>=_b){return false;}}}else{if(this._isPassPrevCell(_e,_f,_a,_b)){return false;}}}else if(_a=="up"){if(_d.ctrlpoint.row>_c||(_d.ctrlpoint.row==_c&&_d.ctrlpoint.subrow>_b)){if(_e.begsubrow.length==(_d.ctrlpoint.row-_c+1)){if(_e.begsubrow[0]<=_b){return false;}}}else{if(this._isPassPrevCell(_e,_f,_a,_b)){return false;}}}return true;};_pGrid._moveToCell=function(_a,_b,_c,_d,_e,_f){if(this._selectinfo.curdsrow<0){if(this.rowcount>0&&(_a=="next"||_a=="down")){this._moveToPosCell(0,0);return true;}return false;}var _g=this._curFormat;var _h=this._beforebodycellpos=this._selectinfo.curcell;var _i=this._beforebodycolpos=this._selectinfo.curcol;var _j=this._beforebodyrowpos=this._selectinfo.curdsrow;var _k=this._beforebodysubrowpos=this._selectinfo.cursubrow;var _l=this._beforepvt=this._selectinfo.curpvt;var _m,_n,_o,_p;var _q= -9;var _r;var _s=_g._bodycells;var _t=_s.length;if(_a=="next"){if(_b){_r=this._getLastEditableCell();if(_r.row==null||(_r.row<=this._selectinfo.curdsrow&&_r.cell==this._selectinfo.curcell)){return false;}}for(;true;){var _w=(this._binddataset)?this._binddataset.getRowCount():this.rowcount;if(this._selectinfo.curdsrow>=(_w-1)&&this._selectinfo.curcell>=(_g._bodycells.length-1)){return false;}if(this._selectinfo.curcell>=_s.length-1){if(_c){return false;}_m=0;_n=0;_o=this._selectinfo.curdsrow+1;_p=0;this._setSelectedInfo(_m,_n,_o,_p,_q);}else{if(_c){_m=this._selectinfo.curcell;_n=_s[this._selectinfo.curcell]._col+_s[this._selectinfo.curcell]._colspan;_o=this._selectinfo.curdsrow;_p=this._selectinfo.cursubrow;for(var _x=0;_x<_t;_x++ ){if(_s[_x]._col==_n&&(_s[_x]._row<=this._selectinfo.cursubrow&&this._selectinfo.cursubrow<(_s[_x]._row+_s[_x]._rowspan))){if(!_d||_d==_s[_x]._area){_m=_x;_p=_s[_x]._row;break;}}}if(_m==this._selectinfo.curcell){return false;}}else{_m=this._selectinfo.curcell+1;_n=_s[_m]._col;_o=this._selectinfo.curdsrow;_p=_s[_m]._row;}if(_e!=undefined&&_e<_n){return false;}this._setSelectedInfo(_m,_n,_o,_p,_q);if(_g._cols[_n].size<=0){continue;}if(this._isAreaSelect()){if(!this._getAreaMoveCell(_a,_n,_o)){continue;}}}if(_f&&_o>=0){var _y=this._getCurrentBodyCell(_o,_m);if(_y){_y._showfull(_y);}}if(_b){if(this._hasTree){var _z=false;var _aa=this._treeIndexes;var _ab=_aa.length;for(var _ac=0;_ac<_ab;_ac++ ){if(_aa[_ac]==_o){_z=true;break;}else if(_aa[_ac]>_o){break;}}if(_z==false){continue;}}var _ad=_s[_m];var _ae=_ad._getEdittype(_o);if(_ae==""||_ae=="none"){continue;}}break;}}else if(_a=="prev"){for(;true;){if(this._selectinfo.curcell<=0){if(_c||this._selectinfo.curdsrow<=0){return false;}_m=_g._bodycells.length-1;_n=_s[_m]._col;_o=this._selectinfo.curdsrow-1;_p=_s[_m]._row;this._setSelectedInfo(_m,_n,_o,_p,_q);}else{var _af;if(_c){_m=this._selectinfo.curcell;_af=_n=this._selectinfo.curcol-1;_o=this._selectinfo.curdsrow;_p=this._selectinfo.cursubrow;for(var _x=0;_x<_t;_x++ ){if((_s[_x]._col<=_n&&_n<_s[_x]._col+_s[_x]._colspan)&&(_s[_x]._row<=this._selectinfo.cursubrow&&this._selectinfo.cursubrow<(_s[_x]._row+_s[_x]._rowspan))){if(!_d||_d==_s[_x]._area){_n=_s[_x]._col;_m=_x;_p=_s[_x]._row;break;}}}if(_m==this._selectinfo.curcell){return false;}}else{_m=this._selectinfo.curcell-1;_n=_s[_m]._col;_o=this._selectinfo.curdsrow;_p=_s[_m]._row;}if(_e!=undefined&&_e>_n){return false;}this._setSelectedInfo(_m,_n,_o,_p,_q);if(_g._cols[_n].size<=0){continue;}if(this._isAreaSelect()){if(!this._getAreaMoveCell(_a,_af,_o)){continue;}}}if(_f&&_o>=0){var _y=this._getCurrentBodyCell(_o,_m);if(_y){_y._showfull(_y);}}if(_b){if(this._hasTree){var _z=false;var _aa=this._treeIndexes;var _ab=_aa.length;for(var _ac=_ab-1;_ac>=0;_ac-- ){if(_aa[_ac]==_o){_z=true;break;}else if(_aa[_ac]<_o){break;}}if(_z==false){continue;}}var _ad=_s[_m];var _ae=_ad._getEdittype(_o);if(_ae==""||_ae=="none"){continue;}}break;}}else if(_a=="up"){var _ag= -1,_ah= -1,_ai= -1;var _aj=this._selectinfo.curcol;var _ak;for(;true;){if(this._isSelectRowType()){if(this._selectinfo.curdsrow==0){return false;}_m=this._selectinfo.curcell;_n=this._selectinfo.curcol;_o=this._selectinfo.curdsrow-1;_p=this._selectinfo.cursubrow;}else{if(this._selectinfo.curdsrow==0&&this._selectinfo.cursubrow==0){return false;}if(this._fixed_startrow>=this._selectinfo.curdsrow){return false;}_ak=_s[this._selectinfo.curcell]._rowspan;var _al;if(this._selectinfo.cursubrow==0){for(var _x=_t-1;_x>=0;_x-- ){if(_s[_x]._col<=this._selectinfo.curcol&&this._selectinfo.curcol<(_s[_x]._col+_s[_x]._colspan)){_ag=_s[_x]._cellidx;_ah=_s[_x]._col;_ai=_s[_x]._row;_al=_ai+_s[_x]._rowspan-1;break;}}_n=_ah;_m=_ag;_o=this._selectinfo.curdsrow-1;_p=_ai;}else{for(var _x=this._selectinfo.curcell-1;_x>=0;_x-- ){if(_s[_x]._col<=this._selectinfo.curcol&&this._selectinfo.curcol<(_s[_x]._col+_s[_x]._colspan)&&_s[_x]._row<=(this._selectinfo.cursubrow-1)&&(this._selectinfo.cursubrow-1)<(_s[_x]._row+_s[_x]._rowspan)){_ag=_s[_x]._cellidx;_ah=_s[_x]._col;_ai=_s[_x]._row;_al=_ai+_s[_x]._rowspan-1;break;}}_n=_ah;_m=_ag;_o=this._selectinfo.curdsrow;_p=_ai;}}this._setSelectedInfo(_m,_n,_o,_p,_q);if(this._hasTree){var _z=false;var _aa=this._treeIndexes;var _ab=_aa.length;for(var _ac=_ab-1;_ac>=0;_ac-- ){if(_aa[_ac]==_o){_z=true;break;}else if(_aa[_ac]<_o){break;}}if(_z==false){continue;}}if(this._isAreaSelect()){if(!this._getAreaMoveCell(_a,_al,_o)){continue;}}break;}}else if(_a=="down"){var _w=this._getGridRowCount();var _am=this._dsRowToDispRow(this._selectinfo.curdsrow);var _an=_g._bodyrows.length-1;var _ao= -1,_ap= -1,_aq= -1;var _aj=this._selectinfo.curcol;var _ar=this._selectinfo.cursubrow;var _ak;for(;true;){if(this._isSelectRowType()){if(_w-1<=_am){return false;}_m=this._selectinfo.curcell;_n=this._selectinfo.curcol;_o=this._selectinfo.curdsrow+1;_p=this._selectinfo.cursubrow;}else{if(_w-1<=_am&&this._selectinfo.cursubrow==_an){if(this.vscrollbar){this.vscrollbar.set_pos(this.vscrollbar.max);}return false;}_ak=_s[this._selectinfo.curcell]._rowspan;if((this._selectinfo.cursubrow+_ak-1)==_an){for(var _x=0;_x<_t;_x++ ){if(_s[_x]._col<=this._selectinfo.curcol&&this._selectinfo.curcol<(_s[_x]._col+_s[_x]._colspan)){_ao=_s[_x]._cellidx;_ap=_s[_x]._col;_aq=_s[_x]._row;break;}}_n=_ap;_m=_ao;_o=this._selectinfo.curdsrow+1;_p=_aq;}else{for(var _x=this._selectinfo.curcell+1;_x<_t;_x++ ){if(_s[_x]._col<=this._selectinfo.curcol&&this._selectinfo.curcol<(_s[_x]._col+_s[_x]._colspan)&&(_s[_x]._row==this._selectinfo.cursubrow+(_ak-1)+1)){_ao=_s[_x]._cellidx;_ap=_s[_x]._col;_aq=_s[_x]._row;break;}}_n=_ap;_m=_ao;_o=this._selectinfo.curdsrow;_p=_aq;}}this._setSelectedInfo(_m,_n,_o,_p,_q);if(this._hasTree){var _z=false;var _aa=this._treeIndexes;var _ab=_aa.length;for(var _ac=0;_ac<_aa.length;_ac++ ){if(_aa[_ac]==_o){_z=true;break;}else if(_aa[_ac]>_o){break;}}if(_z==false){continue;}}if(this._isAreaSelect()){if(!this._getAreaMoveCell(_a,_p,_o)){continue;}}break;}}var _u;this._iskey_movetocell=false;if(this._keydown_elem){this._iskey_movetocell=true;_u="keydown";}this._hideEditor();var _v=this._ChangeSelect(_m,_n,_o,_p,_q,false,_h,_i,_j,_k,_l,"body",_u);if(!this._keydown_elem){this._moveCellAfterFocus();}else{if(_v==false){if(this.autoenter=="select"){this._showEditor();}}}return true;};_pGrid._moveCellAfterFocus=function(){var _a=true;if(this.autoenter=="select"){if(nexacro.Browser=="Opera"||nexacro.Browser=="IE"){this._onceTime_focus=true;}if(!this._showEditor()){this._hideEditor();_a=false;}this._onceTime_focus=false;}return _a;};_pGrid._setTree=function(_a){_a=nexacro._toBoolean(_a);if(this._hasTree!=_a){this._hasTree=_a;if(_a==true){this._setFixedRow(false,true);this._initTreeStates();}else{this._clearTreeStates();}this._recreate_contents_all(false,false,false,true);}};_pGrid._setTreeCellinfo=function(_a){if(this._treeCellinfo!=_a){this._treeCellinfo=_a;this._setTree(true);}};_pGrid._removeTreeCellinfo=function(_a){if(this._treeCellinfo==_a){this._treeCellinfo=null;this._setTree(false);}};_pGrid._initTreeStates=function(_a){if(this._hasTree&&this._binddataset){this._treeIndexes=this._createTreeIndexes();this._treeStates=this._createTreeStates(_a);this._treeChecked=this._createTreeChecked();this._createTreeHasChild();this._applyTreeStates();if(this._treeIndexes.length>0){this.rowcount=this._treeIndexes.length;}else{this.rowcount=0;}}};_pGrid._createTreeHasChild=function(){var _a=this._rowcount;var _b=this._treeCellinfo;if(this._hasSameNextNode){delete this._hasSameNextNode;}this._hasSameNextNode=new Array(_a);var _c= -1;for(var _d=_a-1;_d>=0;_d-- ){var _e=_b._getTreeLevel(_d);this._maxdepth=Math.max(_e,this._maxdepth);this._rootlevel=Math.min(_e,this._rootlevel);if(_e!=_c){if(this._hasSameNextNode[_d]==undefined){var _f=[];_f[0]=_e;_f[1]=false;this._hasSameNextNode[_d]=_f;}for(var _g=_d-1;_g>=0;_g-- ){var _h=_b._getTreeLevel(_g);if(_e==_h){var _f=[];_f[0]=_e;_f[1]=true;this._hasSameNextNode[_g]=_f;}else if(_e>_h){break;}}}_c=_e;}this._rootlevel=Math.max(_b._getTreeStartLevel(),this._rootlevel);};_pGrid._getParentNodeSameInfo=function(_a,_b){for(var _c=_b;_c>=0;_c-- ){var _d=this._hasSameNextNode[_c];if(_d[0]==_a){return _d[1];}}return false;};_pGrid._createTreeIndexes=function(){if(this._binddataset==null){return [];}var _a=this._binddataset.rowcount;var _b=new Array(_a);for(var _c=0;_c<_a;_c++ ){_b[_c]=_c;}return _b;};_pGrid._createTreeStates=function(_a,_b){if(this._binddataset==null){return [];}var _c=this._binddataset;var _d=this._treeIndexes;var _e=_c.rowcount;var _f=_c._viewRecords;var _g=new Array(_e);var _h=this._treeCellinfo;var _i=this._treeInitStatus[this.treeinitstatus];var _j=null;var _k;if(_i==null){_i=0;}var _l=this._treeStates;if(_a&&_l.length==_e){for(var _m=0,_n=0;_m<_e;_m++ ,_n++ ){if(_f[_m]._rtype==1){_g[_m]=_l[_n];}else if(_f[_m]._rtype==4){if(_h.treestate._bindtype==0){_g[_m]=_l[_n];}}}}if(_i==0||_i==1){var _o=(_i==0)?0:1;var _p=_k= -1;var _q;for(var _m=0;_m<_e;_m++ ){if(!_b){_j=_h._getTreeState(_m);}if(_g[_m]==undefined){if(_j&&_j.length){_g[_m]=parseInt(_j,10);}else{_g[_m]=_o;}}_k=_h._getTreeLevel(_m);if(!_q||_h.treestate._bindtype==0){if(_p>=_k){_g[_m-1]=2;}}_p=_k;_q=_j;}if(_h.treestate._bindtype==0||!_j){_g[_e-1]=2;}}else if(_i==2||_i==3){var _o=(_i==2)?0:1;var _p=_k= -1;for(var _m=0;_m<_e;_m++ ){if(_g[_m]==undefined){_g[_m]=_o;}_k=_h._getTreeLevel(_m);if(_p>=_k){_g[_m-1]=2;}_p=_k;}_g[_e-1]=2;}return _g;};_pGrid._createTreeChecked=function(){if(this._binddataset==null){return [];}var _a=this._binddataset.rowcount;var _b=new Array(_a);var _c=this._treeCellinfo;var _d=null;for(var _e=0;_e<_a;_e++ ){_d=_c._getTreeCheck(_e);if(_d&&(_d>0||_d.length)){_b[_e]=parseInt(_d,10);}else{_b[_e]=0;}}return _b;};_pGrid._updateTreeStates=function(_a,_b){if(this._hasTree&&this._binddataset){if(_a>=0){var _c=this._treeStates;if(_b){_c.splice(_a,0,2);}else{_c.splice(_a,1);if(_c[_a]!=2){if(_c[_a-1]==1){_c[_a-1]=2;}}else{var _d=this._treeCellinfo;var _e=_d._getTreeLevel(_a);var _f=_d._getTreeLevel(_a-1);if(_e==_f){_c[_a-1]=2;}}}this._treeStates=_c;}this._treeIndexes=this._createTreeIndexes();this._treeChecked=this._createTreeChecked();this._createTreeHasChild();this._applyTreeStates();if(this._treeIndexes.length>0){this.rowcount=this._treeIndexes.length;}else{this.rowcount=0;}}};_pGrid._applyTreeStates=function(){var _a=this._treeIndexes;var _b=this._treeStates;var _c=_a.length;var _d=this._treeCellinfo;var _e=_a.slice(0,_a.length);var _f= -1;var _g= -1;var _h=0;for(var _i=0;_i<_c;_i++ ){_h++ ;if(_b[_i]==0){_f=_d._getTreeLevel(_e[_i]);for(var _j=_i+1;_j<_c;_j++ ){_g=_d._getTreeLevel(_e[_j]);if(_g>_f){_i++ ;_a.splice(_h,1);}else{break;}}}}};_pGrid._clearTreeStates=function(){this._treeIndexes=null;this._treeStates=null;this._treeChecked=null;if(this._hasTree){this.rowcount=0;}};_pGrid._getTreeRowPosition=function(_a){if(_a<0||!this._hasTree){return _a;}var _b=this._treeIndexes;var _c=Math.max(_a,_b.length-1);for(var _d=_c;_d>=0;_d-- ){if(_b[_d]==_a){return _d;}else if(_b[_d]<_a){break;}}return -1;};_pGrid._getBindTextCellInfo=function(_a){var _b=this._curFormat;var _c=true;if(!_b){return null;}var _d=[];if(_a){if(_b._headcells){var _e=_b._headcells;var _f=_e.length;var _g;for(var _h=0;_h<_f;_h++ ){_g=_e[_h];if(_g.text._bindexpr==_a){_d.push(_g);}}}if(_b._bodycells){var _i=_b._bodycells;var _j=_i.length;var _g;for(var _h=0;_h<_j;_h++ ){_g=_i[_h];if(_g.text._bindexpr==_a){_d.push(_g);}}}if(_b._summcells){var _k=_b._summcells;var _l=_k.length;var _g;for(var _h=0;_h<_l;_h++ ){_g=_k[_h];if(_g.text._bindexpr==_a){_d.push(_g);}}}}if(_d.length==0&&_b._bodycells){_d=_b._bodycells;_c=false;}return [_d,_c];};_pGrid._isTreeStateChanged=function(_a,_b){var _c=false;if(this._hasTree){var _d=_a.columnid;var _e=this._treeCellinfo;if(_d==_e.treecheck._bindexpr){var _f=_a.row;var _g=this._getTreeRowPosition(_f);var _h=_a.newvalue;this._setTreeChecked(_g,_h);}if(_b==false){if(_d==_e.treestate._bindexpr){var _f=_a.row;var _g=this._getTreeRowPosition(_f);var _h=_a.newvalue;this._setTreeState(_g,_h);_c=true;}if(_d==_e.treelevel._bindexpr){var _i;var _j=this._treeStates;var _k=_e._getTreeLevel(_a.row);for(var _l=_a.row-1;_l>=0;_l-- ){_i=_e._getTreeLevel(_l);if(_i==_k-1&&_j[_l]==2){_j[_l]=1;break;}}_c=true;}}}return _c;};_pGrid._setTreeState=function(_a,_b,_c,_d){_b=parseInt(_b,10);if(isFinite(_b)){var _e=this._treeIndexes[_a];var _f=this._treeStates[_e];var _g=0;if(_b!=_f){if(_b==2){if(_c){this._refreshBodyRow(_a-this._getBodyBegRowPos(_a));}return 1;}else if((_g=this._toggleTreeState(_a,_c,_b,_d))>0){return _g;}}}return 0;};_pGrid._getOrgTreeStates=function(_a){var _b=this._createTreeStates(false,true);if(_b[_a]==2){return 2;}else{return this._treeStates[_a];}};_pGrid._toggleTreeState=function(_a,_b,_c,_d){var _e=this._treeIndexes[_a];var _f;if(_d){_f=this._getOrgTreeStates(_e);}else{_f=this._treeStates[_e];}var _g=false;var _h;if(_f==0){if(this.on_fire_cantreestatuschange(_a,_e,1)!==false){_h=this._expandTreeState(_a);this.on_fire_ontreestatuschanged(_a,_e,1);}}else if(_f==1){if(this.on_fire_cantreestatuschange(_a,_e,0)!==false){_g=true;_h=this._collapseTreeState(_a);this.on_fire_ontreestatuschanged(_a,_e,0);}}else if(_f==2){if(_d){if(_d=="null_value"){this._treeStates[_e]=_c;}else{this._treeStates[_e]=2;}}else{if(this.on_fire_cantreestatuschange(_a,_e,0)!==false){_h=1;this._treeStates[_e]=_c;this.on_fire_ontreestatuschanged(_a,_e,0);}}}if(_b){if(_h==2){if(this._bodyBand){this._bodyBand._matrix._adjustTreeDisplay(_a,_g);}}else if(_h==1){this._refreshBodyRow(_a-this._getBodyBegRowPos(_a));}}return _h;};_pGrid._collapseTreeState=function(_a){var _b=this._treeIndexes;var _c=this._treeStates;var _d=_b.length;var _e=_b[_a];var _f=this._treeCellinfo;if(_c[_e]==1){_c[_e]=0;}else{return 0;}var _g=_f._getTreeLevel(_e);if(nexacro._enableaccessibility&&nexacro._accessibilitytype!=4){var _j=this._getAccessibilityCurrentCell();if(_j){_j._setAccessibilityStatExpanded(false);}}var _h= -1;var _i=0;for(var _k=_a+1;_k<_d;_k++ ){_h=_f._getTreeLevel(_b[_k]);if(_h>_g){_i++ ;}else{break;}}if(_i>0){_b.splice(_a+1,_i);this.rowcount=_b.length;return 2;};return 1;};_pGrid._expandTreeState=function(_a){var _b=this._treeIndexes;var _c=this._treeStates;var _d=_c.length;var _e=_b[_a];var _f=this._treeCellinfo;if(_c[_e]==0){_c[_e]=1;}else{return 0;}var _g=_f._getTreeLevel(_e);if(nexacro._enableaccessibility&&nexacro._accessibilitytype!=4){var _o=this._getAccessibilityCurrentCell();if(_o){_o._setAccessibilityStatExpanded(true);}}var _h= -1;var _i=0;var _j=_e;var _k=[_e];var _l= -1;var _m= -1;var _n=false;for(var _p=_e+1;_p<_d;_p++ ){_h=_f._getTreeLevel(_p);if(_h>_g){if(_l> -1){_m=_f._getTreeLevel(_l);if(_h>_m){if(_n==true){continue;}_j=_l;_k.push(_l);}else if(_h<_m){var _q=_m-_h;_k.splice(_k.length-_q,_q);_j=_k[_k.length-1];}_n=false;}if(_c[_j]>0){_b.splice(_a+1+_i,0,_p);_i++ ;}else{_n=true;}_l=_p;}else{break;}}if(_i>0){this.rowcount=this._treeIndexes.length;return 2;}return 1;};_pGrid._setTreeChecked=function(_a,_b){_b=parseInt(_b,10);if(isFinite(_b)){var _c=this._treeIndexes[_a];var _d=this._treeChecked[_c];if(_b==_d){return false;}else{return (this._toggleTreeChecked(_a));}}return false;};_pGrid._toggleTreeChecked=function(_a){var _b=this._treeIndexes[_a];var _c=this._treeChecked[_b];var _d=(_c==0)?1:0;this._treeChecked[_b]=_d;return true;};_pGrid._getCurrentBodyCell=function(_a,_b){var _c=this._bodyBand;if(_c){if(_a<0){_a=this._selectinfo.curdsrow;}if(_b<0){_b=this._selectinfo.curcell;}var _d=_c._get_row(_a);if(_d){return _d._cells[_b];}}return null;};_pGrid._getCurrentHeadCell=function(_a,_b){var _c=this._headBand;if(_c&&(_b||this._currentDSrow== -1)){if(_a<0){_a=this.currentcell;}var _d=_c._get_rows()[0];if(_d){return _d._cells[_a];}}return null;};_pGrid._getCurrentSummCell=function(_a,_b){var _c=this._summBand;if(_c&&(_b||this._currentDSrow== -2)){if(_a<0){_a=this.currentcell;}var _d=_c._get_rows()[0];if(_d){return _d._cells[_a];}}return null;};_pGrid._showEditor=function(_a){if(nexacro._toBoolean(this.readonly)==true){return false;}var _b=this._find_lastFocused();if(_b!=this){return false;}if(!_a){var _c=this._getCurrentBodyCell( -1, -1);if(!_c){return false;}var _d=this._getBodyBegRowPos(_c._rowidx);var _e=this._endrowpos;var _f=this._selectinfo.currow;var _g=this._selectinfo.curcell;if(_d>_f||_e<_f){return false;}else{if(this._beforeEditRowIdx!=_f||this._beforeEditCellIdx!=_g){if(_c._hasEditor()){_c._showEditor();this._beforeEditRowIdx=this._selectinfo.curdsrow;this._beforeEditCellIdx=this._selectinfo.curcell;this._showEditing=true;var _h=this._getDataRow(_c._rowidx);_c._refobj._editingRow=_h;_c.editshowing=true;var _i=this._currentCellEditor;if(_i){_i._setFocus(false);if(_i.setCaretPos&&!_i.autoselect){_i.setCaretPos(0);}else if(_i.comboedit&&_i.comboedit.setCaretPos){_i.comboedit.setCaretPos(0);}}}else{_c._setFocus(false);}}}}else{var _c=this._getCurrentBodyCell(this._beforeEditRowIdx,this._beforeEditCellIdx);if(_c&&_c._hasEditor()){_c._showEditor(true,true);this._showEditing=true;var _h=this._getDataRow(_c._rowidx);_c._refobj._editingRow=_h;}else{this._hideEditor(true);}}return true;};_pGrid._setdataobj=null;_pGrid._hideEditor=function(_a,_b,_c){if(!_a){var _d=this._getCurrentBodyCell(this._beforeEditRowIdx,this._beforeEditCellIdx);var _e=this._currentCellEditor;if(_e){var _f={succ:false};if(_d){if(_d._hasEditor()){if(!_b){if(_f){_f.succ=_e._setDataset(true);}else{_e._setDataset(true);}}if(this._binddataset.enableevent==false){this._refreshAll();}if(nexacro.Browser=="Safari"){nexacro.OnceCallbackTimer.callonce(_e,function(){_e.set_visible(false);});}else{_e.set_visible(false);}this._currentCellEditor=null;if(_d._is_alive){_d._refobj._editingRow= -9;_d._setDisplayText();_d._hideEditor();if(this._keydown_elem&&!_c){_d._setFocus(false);}}this._showEditing=false;}}else{_e._cellinfo._editingRow= -9;if(_f){_f.succ=_e._setDataset(true,this._currentCellRow);}else{_e._setDataset(true,this._currentCellRow);}_e.set_visible(false);this._currentCellEditor=null;this._showEditing=false;}this._setdataobj=_f;}this._beforeEditCellIdx= -1;this._beforeEditRowIdx= -1;this._currentCellCell= -1;this._currentCellRow= -1;}else{var _e=this._currentCellEditor;if(_e){var _g=_e._adjust_height+10;_e.set_top( -_g);if(_e._cellobj._subComp){_e._cellobj._subComp.set_visible(true);}}}return true;};_pGrid._createEditor=function(_a){var _b=_a._refobj;var _c=this._getDataRow(_a._rowidx);var _d=_b._getEdittype(_c);var _e=this["_createEditor_"+_d];if(_e==null){_e=this._createEditor_text;}if(this._tempEditor){if(this._isDownActionKeyMouse()){this._destroyeditors.push(this._tempEditor);this._tempEditor=null;}else{var _g=this._tempEditor;nexacro.OnceCallbackTimer.callonce(this,function(){if(_g){_g.destroy();_g=null;}},10);}}var _f=_e.call(this,_a);this._tempEditor=this._currentCellEditor=_f;return _f;};_pGrid.getShowEditor=function(){var _a=this._currentCellEditor;if(_a instanceof nexacro.GridControlEdit||_a instanceof nexacro.GridControlTextArea||_a instanceof nexacro.GridControlMaskEdit){return _a;}else{return false;}};_pGrid._createEditor_text=function(_a){return this._createEditor_edit(_a);};_pGrid._createEditor_readonly=function(_a){return this._createEditor_textarea(_a,true);};_pGrid._createEditor_mask=function(_a,_b){return this._createEditor_maskedit(_a);};_pGrid._createEditor_masknumber=function(_a,_b){return this._createEditor_maskedit(_a);};_pGrid._createEditor_button=function(_a){var _b=_a._setPositionInGrid();var _c=new nexacro.GridControlButton("controlbutton",_b.left,_b.top,_b.width,_b.height,this);_c._cellobj=_a;_c._cellinfo=_a._refobj;_c.createComponent();return _c;};_pGrid._createEditor_edit=function(_a,_b){var _c=this._getDataRow(_a._rowidx);var _d=_a._setPositionInGrid();var _e=this._currentCompositionStatus;var _f=this._currentCompositionData;var _g=new nexacro.GridControlEdit("controledit",_d.left,_d.top,_d.width,_d.height,this);_g._cellobj=_a;_g._cellinfo=_a._refobj;var _h=_g._cellinfo._getValue(_c);_g._set_absolutelyValue(_h);_g.createComponent();var _i=_a._refobj;var _j=_i._getAttrValue(_i.editlimit,_c);if(_j==0){_j=this._binddataset._getColumnSize(_i.text._bindtype==1?_i.text._bindexpr:0);}_g.set_maxlength(_j);if(_b){_g.set_readonly(true);}if(nexacro.Browser=="Safari"){if(_e==nexacro.EditBase.Status.CompositionStart){_g._on_input_compositionstart(_f);}else if(_e==nexacro.EditBase.Status.CompositionUpdate){_g._on_input_compositionupdate(_f);}}return _g;};_pGrid._createEditor_maskedit=function(_a,_b){var _c=this._getDataRow(_a._rowidx);var _d=_a._setPositionInGrid();var _e=new nexacro.GridControlMaskEdit("controlmaskedit",_d.left,_d.top,_d.width,_d.height,this);_e._cellobj=_a;_e._cellinfo=_a._refobj;var _f=_e._cellinfo._getValue(_c);_e._set_absolutelyValue(_f);var _g=_e._cellinfo._getEdittype(_c);var _h=_e._cellinfo._getAttrValue(_e._cellinfo.edittype,_c);var _i=_e._cellinfo._getDisplaytype(_c);var _j=_e._cellinfo._getAttrValue(_e._cellinfo.locale,_c);if(_g=="masknumber"){_e.set_type("number");}else{if(_h=="normal"){if(_i=="number"){_e.set_type("number");}else{_e.set_type("string");}}else{_e.set_type("string");}}if(_g=="masknumber"||_g=="mask"){_f=_e._cellinfo._getAttrValue(_e._cellinfo.mask,_c);if(_f!=null){_e.set_mask(_f);}}if(!_j){_j=this.locale;}_e.createComponent();_e.set_locale(_j);return _e;};_pGrid._createEditor_combo=function(_a){var _b=_a._setPositionInGrid();var _c=new nexacro.GridControlCombo("controlcombo",_b.left,_b.top,_b.width,_b.height,this);_c._cellobj=_a;_c._cellinfo=_a._refobj;_c.createComponent();return _c;};_pGrid._createEditor_date=function(_a){var _b=this._getDataRow(_a._rowidx);var _c=_a._setPositionInGrid();var _d=new nexacro.GridControlCalendar("controlcalendar",_c.left,_c.top,_c.width,_c.height,this);_d._cellobj=_a;_d._cellinfo=_a._refobj;var _e=_d._cellinfo._getValue(_b);var _f=_d._cellinfo._getAttrValue(_d._cellinfo.mask,_b);var _g=_d._cellinfo._getAttrValue(_d._cellinfo.locale,_b);if(this._displaymode==true&&!_e){_e=_d._cellinfo._getDisplayText(_b);}if(!_f||_f.length==0){_f="yyyy-MM-dd";}if(!_g){_g=this._getLocale();}_d.createComponent();_d.set_editformat(_f);_d.set_dateformat(_f);_d._currentformat="editformat";_d.set_value(_d._toValueStr(_e));_d.set_locale(_g);_d._resizeCalendar();return _d;};_pGrid._createEditor_textarea=function(_a,_b){var _c=this._getDataRow(_a._rowidx);var _d=_a._setPositionInGrid();var _e=this._currentCompositionStatus;var _f=this._currentCompositionData;var _g=new nexacro.GridControlTextArea("controltextarea",_d.left,_d.top,_d.width,_d.height,this);_g._cellobj=_a;_g._cellinfo=_a._refobj;var _h;if(_g._displaymode==true||_b){_h=_g._cellinfo._getDisplayText(_c);}else{_h=_g._cellinfo._getValue(_c);}_g._set_absolutelyValue(_h);var _i=_g._cellinfo._getWordwrap(_c);_g.set_wordwrap(_i);_g.createComponent();var _j=_a._refobj;var _c=this._getDataRow(_a._rowidx);var _k=_j._getAttrValue(_j.editlimit,_c);if(_k==0){_k=this._binddataset._getColumnSize(_j._col);}_g.set_maxlength(_k);if(_b){_g.set_readonly(true);}if(nexacro.Browser=="Safari"){if(_e==nexacro.EditBase.Status.CompositionStart){_g._on_input_compositionstart(_f);}else if(_e==nexacro.EditBase.Status.CompositionUpdate){_g._on_input_compositionupdate(_f);}}return _g;};_pGrid._setFocus=function(_a,_b,_c){if(nexacro._enableaccessibility){this._currentBand="grid";this._accept_arrow=true;this._removeAccessibilityCurrentFocus();if(_b==2){var _d=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_d&&_d.enable==false){this._setAccessibilityBandFocus("next",true,false);}}else if(_b==3){this._setAccessibilityBandFocus("prev",true);}}return nexacro.Component.prototype._setFocus.call(this,_a,_b,_c);};_pGrid._evtvalue=function(_a,_b){var _c="";if(_a&&_a.value){_c=_a.value;}else if(_b){_c=_b;}return _c;};_pGrid._getAvailableRect=function(_a){var _b={left:0,top:0,right:0,bottom:0,width:0,height:0};_b.left=_a._client_left;_b.top=_a._client_top;_b.right=_a._client_left+_a._client_width;_b.bottom=_a._client_top+_a._client_height;_b.width=_a._client_width;_b.height=_a._client_height;return _b;};_pGrid._getPosRect=function(_a){var _b={left:_a._adjust_left,top:_a._adjust_top,right:_a._getPosRight(),bottom:_a._getPosBottom(),width:_a._adjust_width,height:_a._adjust_height};return _b;};_pGrid._closePopup=function(){var _a=this._currentCellEditor;if(_a&&_a.popupwindow){_a._closePopup();}};_pGrid._destroyOverlayElements=function(){var _a=this._overlay_elements;if(_a.length){for(var _b=0;_b<_a.length;_b++ ){_a[_b].destroy();}_a=[];}this._overlay_elements=[];};_pGrid._setOverlayElements=function(_a,_b){if(_b&&_b<_a.length){for(var _c=_a.length-1;_c>=_b;_c-- ){_a[_c].destroy();_a.splice(_c,1);}}this._overlay_elements=_a;};_pGrid._setOverlayElementProperty=function(_a,_b,_c,_d,_e,_f,_g,_h){if(!_a){return;}_a.setElementPosition(_b,_c);_a.setElementSize(_d,_e);if(_f){var _i=_f._selected;_f._selected=false;var _j=_f._refobj;var _k=this._getDataRow(_f._rowidx);_a.setElementText(_g);_a.setElementWordWrap(_j._getWordwrap(_k));var _l=_f.on_find_CurrentStyle_font(_f._pseudo);var _m=_f.on_find_CurrentStyle_color(_f._pseudo);var _n=_f.on_find_CurrentStyle_align(_f._pseudo);var _o=_f.on_find_CurrentStyle_padding(_f._pseudo);_a.setElementFont(_l);_a.setElementColor(_m);_a.setElementPadding(_o);if(_h){_a.setElementAlignXY(_n.halign,_n.valign);}else if(_j.suppressalign.indexOf("first")==0){_a.setElementAlignXY(_n.halign,"top");}else if(_j.suppressalign.indexOf("last")==0){_a.setElementAlignXY(_n.halign,"bottom");}else{_a.setElementAlignXY(_n.halign,"middle");}var _p=0;if(_h){_p=this._getScrollLeft();}else{var _q=_f.on_find_CurrentStyle_border(_f._pseudo);if(_f.width>(_d+_o.left+_q._right_width)){_p=_f.width-(_d+_o.left+_q._right_width);}}_a.updateCellNodeClient(_b,_c,_d,_e,_p,_h);_f._selected=_i;}};_pGrid._adjustOverlayElements=function(_a,_b,_c){if(!this._curFormat){return false;}if(_a||_c){this._destroyOverlayElements();}var _d=false;var _e=this._overlay_elements;var _f=[],_g="",_h=null,_i=null;var _j=null,_k=null,_l=null;var _m=0,_n=0,_o=0,_p=0,_q=0;var _r=this._curFormat._cols.length;if(this._is_use_suppress){var _t=this._bodyBand;if(!_t){return false;}var _u=_t._get_rows();if(!_u.length){return false;}var _v=_u[0]._cells;for(var _w=0;_w<_r;_w++ ){_i=this._getBodyCellInfo(_w);if(_i&&_i.suppressalign.indexOf("over")>0){cellidx=_w;_n=_m= -1;_o=_p=0;_f=[];for(var _x=0;_x<_u.length;_x++ ){_h=this._getBodyCellItem(_x,cellidx);_j=_h._setPositionInGrid();_m=(_m<0)?_j.left:_m;_n=(_n<0)?_j.top:_n;if(_j.top>_n){_f.push(_h._control_element);}else{_f.splice(0,1,_h._control_element);}var _y=1;var _z=null;if(_v.length>_r&&_i._rowspan==1){_z=this._getBodyCellItem(_x,cellidx+(_r*_y));while(_z){_f.push(_z._control_element);_y++ ;_z=this._getBodyCellItem(_x,cellidx+(_r*_y));}_z=_f[_f.length-1].linkedcontrol;_y=null;}if(_h._getSuppressInfo().text_proc==0){_g=_h._display_text;}if(_h._getSuppressInfo().last){if(_z){_j=_z._setPositionInGrid();_z=null;}_o=(_j.right>_m)?_j.right-_m:0;_p=(_j.bottom>_n)?_j.bottom-_n:0;_k=null;if(_f.length>1){if(_e[_q]){_k=_e[_q];_k.setTargetElements(_f);}else{_k=new nexacro.EventPassOverlayElement(this._control_element,_f);_k.create();_e.push(_k);}if(_k){_q++ ;if(_i.suppressalign.indexOf("first")>=0){_l=_u[0]._cells[cellidx];}if(!_l||_l._selected){_l=_h;}this._setOverlayElementProperty(_k,_m,_n,_o,_p,_l,_g);}}else{_h._showInnerElement();}_f=[];_g="";_j=_l=null;_m=_n= -1;_p=_o=0;}}}}_d=true;}var _s=this._fake_mergecell_arr;if(this._is_use_fakemerge&&_s.length){var _aa=null,_ab=null;var _ac=0,_ad=0,_ae=0,_af=0;for(var _w=0;_w<_s.length;_w++ ){_aa=null;_ab=null;_f=[];fake_mergecell=_s[_w];_ac=fake_mergecell.start_row;_ad=fake_mergecell.end_row;for(var _x=fake_mergecell.start_column;_x<=fake_mergecell.end_column;_x++ ){if(fake_mergecell.start_row== -1){_ac=_ad=_ae=0;_af=(fake_mergecell.end_subrow>=0)?fake_mergecell.end_subrow:this._curFormat._headrows.length-1;}else if(fake_mergecell.start_row== -2){_ac=_ad=_ae=0;_af=(fake_mergecell.end_subrow>=0)?fake_mergecell.end_subrow:this._curFormat._summrows.length-1;}for(var _ag=_ac;_ag<=_ad;_ag++ ){if(fake_mergecell.start_row>=0){_ae=0;_af=this._curFormat._bodyrows.length-1;if(_ag==_ad&&fake_mergecell.end_subrow!=undefined){_af=fake_mergecell.end_subrow;}else if(_ag==_ac&&fake_mergecell.start_subrow!=undefined){_ae=fake_mergecell.start_subrow;}}for(var _ah=_ae;_ah<=_af;_ah++ ){if(fake_mergecell.start_row== -1){_h=this._getCurrentHeadCell(_x+(_r*_ah),true);}else if(fake_mergecell.start_row== -2){_h=this._getCurrentSummCell(_x+(_r*_ah),true);}else{_h=this._getCurrentBodyCell(_ag,_x+(_r*_ah));}if(_h){_f.push(_h._control_element);_aa=(_aa)?_aa:_h;_ab=_h;}}}}if(_aa&&_ab){_l=null,_g=null;_k=_e[_q];if(!_k){_k=new nexacro.EventPassOverlayElement(this._control_element,_f);_k.create();_e.push(_k);}else{_k.setTargetElements(_f);}_i=_aa._refobj;if(_i){_g=_i._getDisplayText(fake_mergecell.start_row);}_l=_aa;var _ai=_aa._setPositionInGrid();var _aj=_ab._setPositionInGrid();_m=_ai.left;_n=_ai.top;_o=(_aj.right>_m)?_aj.right-_m:0;_p=(_aj.bottom>_n)?_aj.bottom-_n:0;if(_b){if(_k){_n=_k.top;_p=_k.height;this._setOverlayElementProperty(_k,_m,_n,_o,_p,_l,_g,true);_q++ ;}continue;}this._setOverlayElementProperty(_k,_m,_n,_o,_p,_l,_g,true);if(!_b){_k.setElementStartHScrollPos(_m);}_m=_n=_o=_p=0;_ai=_aj=_l=_g=_k=null;_q++ ;}fake_mergecell=_aa=_ab=null;}_d=true;}this._setOverlayElements(_e,_q);return _d;};_pGrid._moveToAccessibilityCell=function(_a,_b,_c,_d){if(this._is_band_focus&&!_b){var _f=true;if(_a=="prev"||_a=="up"){_f=this._setAccessibilityBandFocus(_a);}else{if(_a=="next"||(_a=="down"&&this._currentBand=="head")){this.currentcell=this.currentsubrow=this.currentcol=0;}if(!this._moveToPosAccessibilityCell(this.currentrow,this.currentcell)){_f=this._setAccessibilityBandFocus(_a);}}return _f;}if(this._currentBand=="grid"){if(_a=="prev"||_a=="next"||_a=="down"){if(_b){if(_a=="next"){if(this._bodyBand&&this._bodyBand._get_rows().length>0){var _i=null;_i=this._getFirstEditableCell();if(_i&&_i.row!==null){this._showEditorFocus=true;if(this.vscrollbar&&this.vscrollbar.visible){this.vscrollbar.set_pos(0);}this._currentBand="body";this._moveToPosAccessibilityCell(_i.row,_i.cell);this._showEditorFocus=false;return true;}}}return false;}return this._setAccessibilityBandFocus(_a,true);}else{this._accept_arrow=false;return false;}}var _e;var _f=true;var _g=null;var _h=null;this._is_band_focus=false;this._beforegridrowpos=this.currentrow;this._beforegridcolpos=this.currentcol;if(this._currentBand=="body"){this._is_first_bodycell=false;for(;true;){if(_b){_f=this._moveToCell(_a,true,_d,undefined,undefined,true);}else{_f=this._moveToCell(_a,false,_d,undefined,undefined,true);}if(_f){_g=this._getAccessibilityCurrentCell();if(_g){if(_b){_g._setFocus(false);break;}else{_h=_g.on_find_CurrentStyle_accessibility(_g._pseudo);if(_h&&_h.enable){if(_a=="up"||_a=="down"){if(this._isSelectRowType()&&_g._curDisplayType!="tree"){var _j=_g.parent;_j._setFocus(false);break;}}_g._setFocus(false);break;}}}}else{if(!_b){_f=this._setAccessibilityBandFocus(_a);}break;}}return _f;}if(_b){if(this._currentBand=="head"){if(this._bodyBand._get_rows().length>0){this._currentBand="body";var _i=this._getFirstEditableCell();if(_i.row!==null){this._is_first_bodycell=true;_f=this._moveToPosAccessibilityCell(_i.row,_i.cell);}return true;}}return false;}if(_a=="next"){for(;true;){this.currentcell++ ;_g=this._getAccessibilityCurrentCell();if(_g){if(_g.width<=0){continue;}else{_h=_g.on_find_CurrentStyle_accessibility(_g._pseudo);if(_h){if(_h.enable==false){continue;}var _k=_g._refobj;this.currentsubrow=_k._row;this.currentcol=_k._col;_g._showfull();_g._setFocus(false);}}}else{this.currentcell-- ;_f=this._setAccessibilityBandFocus(_a);}break;}}else if(_a=="prev"){for(;true;){this.currentcell-- ;_g=this._getAccessibilityCurrentCell();if(_g){if(_g.width<=0){continue;}else{_h=_g.on_find_CurrentStyle_accessibility(_g._pseudo);if(_h){if(_h.enable==false){continue;}var _k=_g._refobj;this.currentsubrow=_k._row;this.currentcol=_k._col;_g._showfull();_g._setFocus(false);}}}else{this.currentcell++ ;_f=this._setAccessibilityBandFocus(_a);}break;}}else if(_a=="up"){if(this._currentBand=="head"){_e=this._headBand;}else{_e=this._summBand;}if(_e){var _l,_m;_g=this._getAccessibilityCurrentCell();if(_g){var _k=_g._refobj;var _n=_k._row;var _o=_k._col;var _p=this.currentcell;while(true){this.currentcell-- ;_g=this._getAccessibilityCurrentCell();if(_g){_l=_g._refobj._row;_m=_g._refobj._col;if(_m==_o&&_l==_n-1){_h=_g.on_find_CurrentStyle_accessibility(_g._pseudo);if(_h&&_h.enable==false){continue;}this.currentsubrow=_l;this.currentcol=_m;_g._setFocus(false);break;}}else{if(this.currentcell<=0){this.currentcol=_o;this.currentcell=_p;_f=this._setAccessibilityBandFocus(_a);break;}}}}}}else if(_a=="down"){var _l,_m;_g=this._getAccessibilityCurrentCell();if(_g){var _k=_g._refobj;var _n=_k._row;var _o=_k._col;var _p=this.currentcell;while(true){this.currentcell++ ;_g=this._getAccessibilityCurrentCell();if(_g){_l=_g._refobj._row;_m=_g._refobj._col;if(_m==_o&&_l==_n+1){this.currentsubrow=_l;this.currentcol=_m;_g._setFocus(false);break;}}else{this.currentcell=_p;_f=this._setAccessibilityBandFocus(_a);break;}}}}return _f;};_pGrid._setAccessibilityBandFocus=function(_a,_b,_c){var _d=true,_e=null,_f=null,_g=this._currentBand;if(_a=="next"){if(_g=="grid"){if(this._headBand){_e=this._headBand;this._currentBand="head";this._currentDSrow=this.currentrow= -1;}else if(this._bodyBand&&this.summarytype!="top"&&this.summarytype!="lefttop"){_e=this._bodyBand;this._currentBand="body";this._currentDSrow=this.currentrow=0;}else if(this._summBand){_e=this._summBand;this._currentBand="summ";this._currentDSrow=this.currentrow= -2;}else{this._accept_arrow=false;_d=false;}}else{if(_g=="head"){if(this._bodyBand&&this.summarytype!="top"&&this.summarytype!="lefttop"){this._is_first_bodycell=true;_e=this._bodyBand;this._currentBand="body";this._currentDSrow=this.currentrow=0;}else if(this._summBand){_e=this._summBand;this._currentBand="summ";this._currentDSrow=this.currentrow= -2;}}else if(_g=="body"){if(this._summBand&&this.summarytype!="top"&&this.summarytype!="lefttop"){this._hideEditor();_e=this._summBand;this._currentBand="summ";this._currentDSrow=this.currentrow= -2;}}else if(_g=="summ"&&(this.summarytype=="top"||this.summarytype=="lefttop")){if(this._bodyBand){this._is_first_bodycell=true;_e=this._bodyBand;this._currentBand="body";this._currentDSrow=this.currentrow=0;}}}if(_e){if(_c){this.currentsubrow=0;this._moveToPosAccessibilityCell(this.currentrow,this.currentcell);}else{_f=_e.on_find_CurrentStyle_accessibility(_e._pseudo);if(!this._is_band_focus&&(_f&&_f.enable||(_e._isBody&&this.rowcount<=0))){if(_b){this.currentcell=this.currentsubrow=this.currentcol=0;}this._moveToAccessibilityBand(false);}else{if(_g=="grid"&&_b&&!this.on_find_CurrentStyle_accessibility(this._pseudo).enable){this._first_focus=true;}this.currentcell=this.currentsubrow=this.currentcol=0;this._moveToPosAccessibilityCell(this.currentrow,this.currentcell);}}}}else if(_a=="prev"){if(_g=="grid"){if(_b||_c){if(this._summBand&&this.summarytype!="top"&&this.summarytype!="lefttop"){_e=this._summBand;this._currentBand="summ";this._currentDSrow=this.currentrow= -2;this.currentsubrow=_e._get_rows()[0]._format_rows.length-1;}else if(this._bodyBand){_e=this._bodyBand;this._currentBand="body";this._currentDSrow=this.currentrow=this.rowcount-1;this.currentsubrow=0;}else if(this._headBand){_e=this._headBand;this._currentBand="head";this._currentDSrow=this.currentrow= -1;this.currentsubrow=_e._get_rows()[0]._format_rows.length-1;}else{_d=false;}}else{_d=false;}}else{if(_g=="summ"){_f=this._summBand.on_find_CurrentStyle_accessibility(this._summBand._pseudo);if(!this._is_band_focus&&_f&&_f.enable){this._moveToAccessibilityBand(false);}else{if(this._bodyBand&&this.summarytype!="top"&&this.summarytype!="lefttop"){this._is_first_bodycell=true;_e=this._bodyBand;this._currentBand="body";this.currentrow=this._currentDSrow=this.rowcount-1;}else if(this._headBand){_e=this._headBand;this._currentBand="head";this._currentDSrow=this.currentrow= -1;}}}else if(_g=="body"){_f=this._bodyBand.on_find_CurrentStyle_accessibility(this._bodyBand._pseudo);if(!this._is_band_focus&&_f&&_f.enable){this._hideEditor();this._moveToAccessibilityBand(false);}else{if(this._summBand&&(this.summarytype=="top"||this.summarytype=="lefttop")){this._hideEditor();_e=this._summBand;this._currentBand="summ";this._currentDSrow=this.currentrow= -2;this.currentsubrow=this._curFormat._summrows.length-1;}else if(this._headBand){this._hideEditor();_e=this._headBand;this._currentBand="head";this._currentDSrow=this.currentrow= -1;this.currentsubrow=this._curFormat._headrows.length-1;}}}}if(_e){if(_e._isBody&&this.rowcount<=0){this._removeAccessibilityCurrentFocus();_e._setFocus(false);this.currentcol=this._curFormat._cols.length-1;this.currentcell= -1;}else{if(!_c){this.currentcol=this._curFormat._cols.length-1;this.currentcell=this._getAccessibilityLastCellIndex()-1;}this._moveToPosAccessibilityCell(this.currentrow,this.currentcell);}}}else if(_a=="up"){if(_g=="summ"){_f=this._summBand.on_find_CurrentStyle_accessibility(this._summBand._pseudo);if(!this._is_band_focus&&_f&&_f.enable){this._moveToAccessibilityBand(false);}else{if(this._bodyBand&&this.summarytype!="top"&&this.summarytype!="lefttop"){_e=this._bodyBand;this._currentBand="body";this._currentDSrow=this.currentrow=this.rowcount-1;this.currentsubrow=0;}else if(this._headBand){_e=this._headBand;this._currentBand="head";this._currentDSrow=this.currentrow= -1;this.currentsubrow=this._curFormat._headrows.length-1;}else{_g="grid";}}}else if(_g=="body"){_f=this._bodyBand.on_find_CurrentStyle_accessibility(this._bodyBand._pseudo);if(!this._is_band_focus&&_f&&_f.enable){this._hideEditor();this._moveToAccessibilityBand(false);}else{if(this._summBand&&(this.summarytype=="top"||this.summarytype=="lefttop")){this._hideEditor();_e=this._summBand;this._currentBand="summ";this._currentDSrow=this.currentrow= -2;this.currentsubrow=this._curFormat._summrows.length-1;}else if(this._headBand){this._hideEditor();_e=this._headBand;this._currentBand="head";this._currentDSrow=this.currentrow= -1;this.currentsubrow=this._curFormat._headrows.length-1;}else{_g="grid";}}}else if(_g=="head"&&this.currentcell<=0){_f=this._headBand.on_find_CurrentStyle_accessibility(this._headBand._pseudo);if(!this._is_band_focus&&_f&&_f.enable){this._moveToAccessibilityBand(false);}else{_g="grid";}}if(_e){this._moveToPosAccessibilityCell(this.currentrow,this.currentcell);}else if(_g=="grid"){this._is_band_focus=false;this._currentBand=_g;_f=this.on_find_CurrentStyle_accessibility(this._pseudo);if(_f&&_f.enable){this._moveToAccessibilityBand(true);}else{_d=this._moveToAccessibilityCell(_a);}}}else if(_a=="down"){if(_g=="grid"){_d=this._setAccessibilityBandFocus("next",true);}else{if(_g=="head"){if(this._bodyBand&&this.summarytype!="top"&&this.summarytype!="lefttop"){this._is_first_bodycell=true;_e=this._bodyBand;this._currentBand="body";this._currentDSrow=this.currentrow=0;}else if(this._summBand){_e=this._summBand;this._currentBand="summ";this._currentDSrow=this.currentrow= -2;}}else if(_g=="body"&&this.summarytype!="top"&&this.summarytype!="lefttop"){if(this._summBand){this._hideEditor();_e=this._summBand;this._currentBand="summ";this._currentDSrow=this.currentrow= -2;}else if(this._bodyBand&&this.rowcount<=0){this._hideEditor();this._accept_arrow=false;_d=false;}}else if(_g=="summ"&&(this.summarytype=="top"||this.summarytype=="lefttop")){if(this._bodyBand){this._is_first_bodycell=true;_e=this._bodyBand;this._currentBand="body";this._currentDSrow=this.currentrow=0;}}if(_e){_f=_e.on_find_CurrentStyle_accessibility(_e._pseudo);if(!this._is_band_focus&&_f&&_f.enable||(this.rowcount<=0&&_e._isBody)){this._moveToAccessibilityBand(false);}else{this.currentsubrow=0;this._moveToPosAccessibilityCell(this.currentrow,this.currentcell);}}else if(this.currentcell>=this._getAccessibilityLastCellIndex()-1){this._accept_arrow=false;_d=false;}}}return _d;};_pGrid._getAccessibilityCurrentCell=function(_a,_b){var _c=null;if(_a===undefined||_b===undefined){_a= -1;_b= -1;}else if(_b<0){_b=this._getAccessibilityCellIndex();}if(this._currentBand=="body"){_c=this._getCurrentBodyCell(_a,_b);}else{if(this._currentBand=="head"){_c=this._getCurrentHeadCell(_b,true);}else{_c=this._getCurrentSummCell(_b,true);}}return _c;};_pGrid._getAccessibilityLastCellIndex=function(){var _a= -1;if(this._currentBand=="head"&&this._curFormat._headcells){_a=this._curFormat._headcells.length;}else if(this._currentBand=="body"&&this._curFormat._bodycells){_a=this._curFormat._bodycells.length;}else if(this._currentBand=="summ"&&this._curFormat._summcells){_a=this._curFormat._summcells.length;}return _a;};_pGrid._removeAccessibilityCurrentFocus=function(_a){var _b=this._getWindow();if(_a){_b._removeFromCurrentFocusPath(this,true);}else{if(this._currentBand=="body"){_b._removeFromCurrentFocusPath(this._bodyBand,true);}else if(this._currentBand=="head"){_b._removeFromCurrentFocusPath(this._headBand,true);}else if(this._currentBand=="summ"){_b._removeFromCurrentFocusPath(this._summBand,true);}}};_pGrid._moveToAccessibilityBand=function(_a){this._removeAccessibilityCurrentFocus(_a);if(!_a){this._is_band_focus=true;var _b=this._currentBand;if(_b=="head"){this._headBand._setFocus(false);}else if(_b=="body"){this._bodyBand._setFocus(false);}else if(_b=="summ"){this._summBand._setFocus(false);}}else{this._setFocus(false);}};_pGrid._moveToPosAccessibilityCell=function(_a,_b){var _c=false,_d=null,_a=this._getDataRow(_a),_b=this._getAccessibilityCellIndex(_b);if(this._currentBand=="body"&&this._bodyBand._get_rows().length>0){this._hideEditor();_d=this._getAccessibilityCurrentCell();if(_d){_d._stat_change("notfocus","normal");}this._moveToPosCell(_a,_b);}_d=this._getAccessibilityCurrentCell(_a,_b);if(_d&&(this._currentBand!="body"||this.autoenter!="select")){_c=true;_d._showfull();_d._setFocus(false);this.currentcol=_d._refobj._col;}this._is_band_focus=this._first_focus=false;return _c;};_pGrid._getAccessibilityCellIndex=function(_a){var _b=null;if(this._currentBand=="body"){_b=this._bodyBand;}else if(this._currentBand=="head"){_b=this._headBand;}else if(this._currentBand=="summ"){_b=this._summBand;}if(_b){var _c=_b._get_row(this._getDataRow(this.currentrow));if(_c){var _d=_c._cells,_e=null;for(var _f=0;_f<_d.length;_f++ ){_e=_d[_f]._refobj;if(_e._col<=this.currentcol&&this.currentcol<=(_e._col+_e._colspan-1)){if(this.currentsubrow==0){return _d[_f]._cellidx;}else{if(_e._row==this.currentsubrow){return _d[_f]._cellidx;}}}}}}return (_a>=0)?_a:null;};};