gx.grid={drawAtServer:false,deleteMethods:{images:0,menu:1,none:2},deletePositions:{left:0,right:1,bottomR:2,bottomL:3,topR:4,topL:5},deleteMethod:null,deleteImage:null,undeleteImage:null,deletePosition:null,deletePositionFree:null,deleteTooltip:null,deleteTitle:null,lastFocusCtrl:null,styles:{none:0,uniform:1,header:2,report:3},getImplClass:function(c,a){if(a){gx.lang.inherits(gx.ui.grid,gx.uc.UserControl);gx.lang.inherits(gx.ui.grid,gx.grid.impl);gx.lang.inherits(a,gx.ui.grid);var b=new a();if(c){b.ParentObject=c.parentObject;b.ControlName=c.gridName;c.parentObject.setUserControl(b)}return b}return new gx.grid.impl("gx")},grid:function(parentObj,gLvl,gLvlName,gId,gName,rgName,cName,gCmpCtx,gIsInMaster,pName,gKey,gFreestyle,gCols,aSelect,aHover,gRows,gPaging,gDragable,gSetsCtx,gBondColl,gWidth,gWidthUnit,newRowtext,pageSizeParm,gHasAddlines,gHasFEL,gImplClass,gOnLineActEvt,aCollap,gBondCollName){this.parentObject=parentObj;this.gridLvl=gLvl;this.gridLvlName=gLvlName;this.gridId=gId;this.gridName=gName;this.realGridName=rgName;this.containerName=cName||this.gridName+"Container";this.parentName=pName||"";this.pagingParms=[];this.lvlKey=gKey||[];this.isFreestyle=gFreestyle||false;this.allowSelection=aSelect||false;this.allowHovering=aHover||false;this.allowCollapsing=aCollap||false;this.collapsed=false;this.sortable=true;this.selectionColor=null;this.hoverColor=null;this.visible=true;this.refreshTimer=null;this.pageSizeParm=pageSizeParm||false;this.hasAddlines=gHasAddlines||false;this.hasForEachLine=gHasFEL||false;this.width=(gWidth!=undefined)?gWidth:0;this.widthUnit=gWidthUnit||"";this.gridCols=(gCols!=undefined)?gCols:1;this.gridCols=(this.gridCols!=0)?this.gridCols:9999;this.gridRows=(gRows!=undefined)?gRows:5;this.usePaging=gPaging||false;this.usePaging=this.usePaging&&!this.isFreestyle;this.eof=1;this.firstRecordOnPage=0;this.defaultDragable=gDragable||false;this.defaultSetsContext=gSetsCtx||false;this.boundedCollType=gBondColl||"";this.boundedCollName=gBondCollName||"";this.contextMenu=null;this.gxContainerCtrl=null;this.lastRefreshParms="";this.gxComponentContext=gCmpCtx;this.isMasterPageGrid=gIsInMaster;this.htmlTags="";this.onLineActivate=gOnLineActEvt;this.addingRows=false;this.deleteMethod=gx.grid.deleteMethod;this.DatePickersControls=[];this.GridUserControls=[];this.GridComponents=[];this.GridControls=[];this.implClass=gImplClass;this.grid=gx.grid.getImplClass(this,gImplClass);this.grid.ownerGrid=this;this.grid.parentGxObject=this.parentObject;this.grid.gxLvl=this.gridLvl;this.grid.gxId=this.gridId;this.grid.gxGridName=this.gridName;this.grid.gxGridObject=this.containerName;this.grid.gxParentName=this.parentName;this.grid.gxIsFreestyle=this.isFreestyle;this.grid.gxWidth=this.width;this.grid.gxWidthUnit=this.widthUnit;this.grid.gxHeight=0;this.grid.gxAllowSelection=this.allowSelection;this.grid.gxAllowHovering=this.allowHovering;this.grid.gxAllowCollapsing=this.allowCollapsing;this.grid.gxCollapsed=this.collapsed;this.grid.gxSortable=this.sortable;
this.grid.gxSelectionColor=this.selectionColor;this.grid.gxHoverColor=this.hoverColor;this.grid.gxVisible=this.visible;this.grid.gxGridCols=this.gridCols;this.grid.gxCmpContext=this.gxComponentContext;this.grid.gxHtmlTags=this.htmlTags;this.grid.gxIsMasterPageGrid=this.isMasterPageGrid;this.grid.gxDragable=this.defaultDragable;this.grid.gxHasAddlines=this.hasAddlines;this.grid.gxHasForEachLine=this.hasForEachLine;this.grid.gxOnLineActivate=this.onLineActivate;this.grid.gxNewRowText=(newRowtext!=undefined)?newRowtext:"New Row";this.currentBuffer=this.grid.gxBuffer;this.parentGrid=null;this.childGrids=[];this.hiddens=[];this.oldCmps={};this.isUsercontrol=gx.lang.instanceOf(this.grid,gx.uc.UserControl);var oThis=this;this.gxCreateGridCode=function(pRowId){return new gx.grid.grid(oThis.parentObject,oThis.gridLvl,oThis.gridLvlName,oThis.gridId,oThis.gridName+"_"+pRowId,oThis.gridName,oThis.containerName+"_"+pRowId,oThis.gxComponentContext,oThis.isMasterPageGrid,oThis.parentName,oThis.lvlKey,oThis.isFreestyle,oThis.gridCols,oThis.allowSelection,oThis.allowHovering,oThis.gridRows,oThis.usePaging,oThis.defaulDragable,oThis.defaulSetsContext,oThis.boundedCollType,oThis.width,oThis.widthUnit,oThis.grid.gxNewRowText,oThis.pageSizeParm,oThis.hasAddlines,oThis.hasForEachLine,oThis.implClass,oThis.onLineActivate,oThis.allowCollapsing)};this.gxAddColumnsCode=[];this.grid.usePaging=this.usePaging;this.grid.eof=this.eof;this.grid.firstRecordOnPage=this.firstRecordOnPage;this.postingVariables=[];this.addColumnDinCode=function(func,args){this.gxAddColumnsCode.push(function(){func.apply(this,args)})};this.addSingleLineEdit=function(colAttId,colId,colHtmlName,colTitle,colTooltip,colAttName,colType,colWidth,colWidthUnit,colMLength,colSize,colAlign,hasClick,suggestInfo,hcAttId,hcAttName,colVisible,colDecimals,setCtx,isPassword){this.addColumnDinCode(this.addSingleLineEdit,arguments);var newCol=this.newColumn(colTitle,colType,colAlign,colWidth);newCol.visible=colVisible;newCol.htmlName=colHtmlName;newCol.gxId=colId;newCol.gxAttId=colAttId;newCol.gxAttName=colAttName;newCol.gxTooltip=colTooltip;newCol.gxWidthUnit=colWidthUnit;newCol.gxSetsContext=setCtx;newCol.gxControl=new gx.html.controls.singleLineEdit();newCol.gxControl.column=newCol;newCol.gxControl.isPassword=isPassword;newCol.gxControl.visible=newCol.visible;newCol.gxControl.dataType=newCol.type;this.grid.addColumn(newCol)};this.addPostingVar=function(varName){this.postingVariables.push(varName)};this.addMultipleLineEdit=function(colAttId,colId,colHtmlName,colTitle,colAttName,colType,colWidth,colWidthUnit,colHeight,colHeightUnit,colMLength,colSize,colAlign,hasClick,colVisible,setCtx,colFormat){this.addColumnDinCode(this.addMultipleLineEdit,arguments);var newCol=this.newColumn(colTitle,colType,colAlign,colWidth);newCol.visible=colVisible;newCol.htmlName=colHtmlName;newCol.gxId=colId;newCol.gxAttId=colAttId;newCol.gxAttName=colAttName;newCol.gxWidthUnit=colWidthUnit;newCol.gxSetsContext=setCtx;newCol.gxControl=new gx.html.controls.multipleLineEdit();
newCol.gxControl.column=newCol;newCol.gxControl.dataType=newCol.type;newCol.gxControl.visible=newCol.visible;newCol.gxControl.heightUnit=colHeightUnit;this.grid.addColumn(newCol)};this.addBlob=function(colAttId,colId,colHtmlName,colTitle,colAttName,colType,bDisplay,cHeight,cWidth,cHUnit,cWUnit,colVisible,setCtx){this.addColumnDinCode(this.addBlob,arguments);var newCol=this.newColumn(colTitle,colType,"left",cWidth);newCol.visible=colVisible;newCol.htmlName=colHtmlName;newCol.gxId=colId;newCol.gxAttId=colAttId;newCol.gxAttName=colAttName;newCol.gxWidthUnit=cWUnit;newCol.gxSetsContext=setCtx;newCol.gxControl=new gx.html.controls.blob();newCol.gxControl.column=newCol;newCol.gxControl.dataType=newCol.type;newCol.gxControl.visible=newCol.visible;newCol.gxControl.height=cHeight;newCol.gxControl.width=cWidth;this.grid.addColumn(newCol)};this.addRadioButton=function(colAttId,colId,colHtmlName,colTitle,colAttName,colType,hasClick,colVertical,colVisible,setCtx){this.addColumnDinCode(this.addRadioButton,arguments);var newCol=this.newColumn(colTitle,colType,"left","");newCol.visible=colVisible;newCol.htmlName=colHtmlName;newCol.gxId=colId;newCol.gxAttId=colAttId;newCol.gxAttName=colAttName;newCol.gxSetsContext=setCtx;newCol.gxControl=new gx.html.controls.radio();newCol.gxControl.column=newCol;newCol.gxControl.dataType=newCol.type;newCol.gxControl.vertical=colVertical;newCol.gxControl.visible=newCol.visible;this.grid.addColumn(newCol)};this.addComboBox=function(colAttId,colId,colHtmlName,colTitle,colAttName,colType,hasClick,rtEnabled,colVisible,setCtx,colWidth,colWidthUnit){this.addColumnDinCode(this.addComboBox,arguments);var newCol=this.newColumn(colTitle,colType,"left",colWidth);newCol.visible=colVisible;newCol.htmlName=colHtmlName;newCol.gxId=colId;newCol.gxAttId=colAttId;newCol.gxAttName=colAttName;newCol.gxSetsContext=setCtx;newCol.gxWidthUnit=colWidthUnit;newCol.gxControl=new gx.html.controls.comboBox();newCol.gxControl.column=newCol;newCol.gxControl.dataType=newCol.type;newCol.gxControl.rtEnabled=(rtEnabled==1);newCol.gxControl.visible=newCol.visible;this.grid.addColumn(newCol)};this.addListBox=function(colAttId,colId,colHtmlName,colTitle,colAttName,colType,hasClick,rtEnabled,colVisible,setCtx,colWidth,colWidthUnit,colRows){this.addColumnDinCode(this.addListBox,arguments);var newCol=this.newColumn(colTitle,colType,"left",colWidth);newCol.visible=colVisible;newCol.htmlName=colHtmlName;newCol.gxId=colId;newCol.gxAttId=colAttId;newCol.gxAttName=colAttName;newCol.gxSetsContext=setCtx;newCol.gxWidthUnit=colWidthUnit;newCol.gxControl=new gx.html.controls.listBox();newCol.gxControl.column=newCol;newCol.gxControl.dataType=newCol.type;newCol.gxControl.rows=(typeof(colRows)!="undefined")?colRows:4;newCol.gxControl.rtEnabled=(rtEnabled==1);newCol.gxControl.visible=newCol.visible;this.grid.addColumn(newCol)};this.addCheckBox=function(colAttId,colId,colHtmlName,colTitle,colCaption,colAttName,colType,checkedVal,unCheckedVal,hasClick,colVisible,setCtx,colWidth,colWidthUnit){this.addColumnDinCode(this.addCheckBox,arguments);
var newCol=this.newColumn(colTitle,colType,"left",colWidth);newCol.visible=colVisible;newCol.htmlName=colHtmlName;newCol.gxId=colId;newCol.gxAttId=colAttId;newCol.gxAttName=colAttName;newCol.gxChecked=checkedVal;newCol.gxUnChecked=unCheckedVal;newCol.gxSetsContext=setCtx;newCol.gxWidthUnit=colWidthUnit;newCol.gxControl=new gx.html.controls.checkBox();newCol.gxControl.column=newCol;newCol.gxControl.checkedValue=checkedVal;newCol.gxControl.uncheckedValue=unCheckedVal;newCol.gxControl.dataType=newCol.type;newCol.gxControl.visible=newCol.visible;this.grid.addColumn(newCol)};this.addBitmap=function(colAttId,colHtmlName,colId,colWidth,colWidthUnit,colHeight,colHeightUnit,hasClick,jsCode,colTitle){this.addColumnDinCode(this.addBitmap,arguments);var newCol=this.newColumn(colTitle,"","left",colWidth);newCol.htmlName=colHtmlName;newCol.gxId=colId;newCol.gxAttId=colAttId;newCol.gxWidthUnit=colWidthUnit;newCol.gxControl=new gx.html.controls.image();newCol.gxControl.column=newCol;newCol.gxControl.dataType=newCol.type;newCol.gxControl.width=colWidth;newCol.gxControl.widthUnit=colWidthUnit;newCol.gxControl.height=colHeight;newCol.gxControl.heightUnit=colHeightUnit;this.grid.addColumn(newCol)};this.addTextBlock=function(colHtmlName,hasClick){this.addColumnDinCode(this.addTextBlock,arguments);var newCol=this.newColumn("","","left");newCol.htmlName=colHtmlName;newCol.gxControl=new gx.html.controls.textBlock();newCol.gxControl.column=newCol;newCol.gxControl.dataType=newCol.type;this.grid.addColumn(newCol)};this.addButton=function(ControlId,HtmlName,BorderStyle,GxEvent,EventName){this.addColumnDinCode(this.addButton,arguments);var newCol=this.newColumn("","","left");newCol.htmlName=HtmlName;newCol.gxId=ControlId;newCol.gxControl=new gx.html.controls.button();newCol.gxControl.column=newCol;newCol.gxControl.dataType=newCol.type;this.grid.addColumn(newCol)};this.addGrid=function(GridCtrl){this.addColumnDinCode(this.addGrid,arguments);this.childGrids.push(GridCtrl);var newCol=this.newColumn("","","left");newCol.gxControl=new gx.html.controls.grid();newCol.gxControl.column=newCol;this.grid.addColumn(newCol)};this.addUsercontrol=function(ControlId,LastId,ClassName,ContainerName,ControlName,ShowFunc,C2VFuncs,V2CFuncs){this.addColumnDinCode(this.addUsercontrol,arguments);var newCol=this.newColumn("","","left");newCol.gxUCId=ControlId;newCol.gxUCLastId=LastId;newCol.gxUCClassName=ClassName;newCol.gxUCContainerName=ContainerName;newCol.gxUCControlName=ControlName;newCol.gxShowFunc=ShowFunc;newCol.gxC2VFuncs=C2VFuncs;newCol.gxV2CFuncs=V2CFuncs;newCol.gxControl=new gx.html.controls.userControl();newCol.gxControl.column=newCol;newCol.gxControl.dataType=newCol.type;this.grid.addColumn(newCol)};this.startContainer=function(){this.addColumnDinCode(this.startContainer,arguments);var newCol=this.newColumn("","","left");newCol.gxControl=new gx.html.controls.userControlContainer();newCol.gxControl.column=newCol;newCol.gxControl.dataType=newCol.type;this.grid.addColumn(newCol)};this.endContainer=function(){this.addColumnDinCode(this.endContainer,arguments);
this.currentBuffer.append("</div>")};this.addWebComponent=function(ControlName){this.addColumnDinCode(this.addWebComponent,arguments);var newCol=this.newColumn("","","left");newCol.gxControl=new gx.html.controls.webComponent();newCol.gxControl.column=newCol;newCol.gxControl.dataType=newCol.type;this.grid.addColumn(newCol)};this.addEmbeddedPage=function(ControlName){this.addColumnDinCode(this.addEmbeddedPage,arguments);var newCol=this.newColumn("","","left");newCol.gxControl=new gx.html.controls.embeddedPage();newCol.gxControl.column=newCol;newCol.gxControl.dataType=newCol.type;this.grid.addColumn(newCol)};this.addHtmlCode=function(Code){this.addColumnDinCode(this.addHtmlCode,arguments);this.currentBuffer.append(Code)};this.startTable=function(CtrlName,TId,Width){this.addColumnDinCode(this.startTable,arguments);var newCol=this.newColumn("","","left");newCol.htmlName=CtrlName+"_"+TId;newCol.gxControl=new gx.html.controls.table();newCol.gxControl.column=newCol;newCol.gxControl.width=Width;newCol.gxControl.dataType=newCol.type;this.grid.addColumn(newCol)};this.endTable=function(){this.addColumnDinCode(this.endTable,arguments);this.currentBuffer.append("</table>")};this.startRow=function(Title,Align,Valign,Bgcolor,Bordercolor,Class){this.addColumnDinCode(this.startRow,arguments);var newCol=this.newColumn("","","left");newCol.gxControl=new gx.html.controls.row();newCol.gxControl.column=newCol;newCol.gxControl.title=Title;newCol.gxControl.align=Align;newCol.gxControl.verticalAlign=Valign;newCol.gxControl.backColor=Bgcolor;newCol.gxControl.borderColor=Bordercolor;newCol.gxControl.cssClass=Class;newCol.gxControl.ownCssClass=Class;newCol.gxControl.dataType=newCol.type;this.grid.addColumn(newCol)};this.endRow=function(){this.addColumnDinCode(this.endRow,arguments);this.currentBuffer.append("</tr>")};this.startCell=function(Title,Align,Valign,Bgcolor,Bordercolor,Height,Width,Colspan,Rowspan,Class){this.addColumnDinCode(this.startCell,arguments);var newCol=this.newColumn("","","left");newCol.gxControl=new gx.html.controls.cell();newCol.gxControl.column=newCol;newCol.gxControl.title=Title;newCol.gxControl.align=Align;newCol.gxControl.verticalAlign=Valign;newCol.gxControl.backColor=Bgcolor;newCol.gxControl.borderColor=Bordercolor;newCol.gxControl.height=Height;newCol.gxControl.width=Width;newCol.gxControl.colSpan=Colspan;newCol.gxControl.rowSpan=Rowspan;newCol.gxControl.cssClass=Class;newCol.gxControl.dataType=newCol.type;this.grid.addColumn(newCol)};this.endCell=function(){this.addColumnDinCode(this.endCell,arguments);this.currentBuffer.append("</td>")};this.startGroup=function(Id,Caption,Height,Width){this.addColumnDinCode(this.startGroup,arguments);var newCol=this.newColumn("","","left");newCol.htmlName=Id;newCol.gxControl=new gx.html.controls.group();newCol.gxControl.column=newCol;newCol.gxControl.id=Id;newCol.gxControl.caption=Caption;newCol.gxControl.height=Height;newCol.gxControl.width=Width;newCol.gxControl.dataType=newCol.type;this.grid.addColumn(newCol)
};this.endGroup=function(){this.addColumnDinCode(this.endGroup,arguments);this.currentBuffer.append("</fieldset>")};this.newColumn=function(colTitle,colType,colAlign,colWidth){var columnType=this.getColumnType(colType);var newCol=new gx.grid.column(colTitle,columnType,colWidth,colAlign);this.currentBuffer=newCol.buffer;newCol.htmlName="";newCol.gxId="";newCol.gxAttId="";newCol.gxAttName="";return newCol};this.getColumnType=function(colType){var columnType;switch(colType){case"decimal":case"int":columnType=gx.types.numeric;break;case"date":columnType=gx.types.date;break;case"dtime":columnType=gx.types.dateTime;break;case"boolean":columnType=gx.types.bool;break;default:columnType=gx.types.character;break}return columnType};this.addOldComponent=function(rowId,ctrlId){if(typeof(this.oldCmps[rowId])=="undefined"){this.oldCmps[rowId]=[]}this.oldCmps[rowId].push(ctrlId)};this.updateOldComponents=function(){var len=this.grid.rows.length;for(var i=0;i<len;i++){delete this.oldCmps[this.grid.rows[i].gxId]}for(var rowId in this.oldCmps){var rowCmps=this.oldCmps[rowId];while(rowCmps.length>0){var ctrlName=rowCmps.shift();gx.fn.deleteHidden(ctrlName)}delete this.oldCmps[rowId]}};this.addHidden=function(CtrlName){this.hiddens.push(CtrlName)};this.addHiddenControl=function(CtrlName,CtrlValue,Persistent){gx.fn.setHidden(CtrlName,CtrlValue);if(Persistent!=true){this.addHidden(CtrlName)}};this.clearHiddens=function(){while(this.hiddens.length>0){var ctrlName=this.hiddens.shift();gx.fn.deleteHidden(ctrlName)}};this.setHtmlTags=function(GridProps){var HtmlTags="";var HtmlTagsStyle=' style="';HtmlTagsStyle+=GridProps.Visible=="0"?"display:none;":"";HtmlTags+=' class="'+GridProps.Class+'"';var eo=gx.lang.emptyObject;HtmlTagsStyle+=!eo(GridProps.Background)?("background:"+GridProps.Background+";"):"";HtmlTagsStyle+=!eo(GridProps.Backcolor)&&GridProps.Backcolor!="0"?("background-color:"+gx.color.html(GridProps.Backcolor).Html+";"):"";HtmlTagsStyle+=!eo(GridProps.Bordercolor)&&GridProps.Bordercolor!="0"?("border-color:"+gx.color.html(GridProps.Bordercolor).Html+";"):"";HtmlTags+=!eo(GridProps.Align)?(' align="'+GridProps.Align+'"'):"";HtmlTags+=!eo(GridProps.Tooltiptext)?(' title="'+GridProps.Tooltiptext+'"'):"";HtmlTagsStyle+=!eo(GridProps.Borderwidth)&&GridProps.Borderwidth!="0"?(" border-width:"+GridProps.Borderwidth+";"):"";HtmlTags+=!eo(GridProps.Cellpadding)?(' cellpadding="'+GridProps.Cellpadding+'"'):"";HtmlTags+=!eo(GridProps.Cellspacing)?(' cellspacing="'+GridProps.Cellspacing+'"'):"";HtmlTags+=!eo(GridProps.Height)&&GridProps.Height!="0"?(' height="'+GridProps.Height+'"'):"";HtmlTags+=!eo(GridProps.Width)&&GridProps.Width!="0"?(' width="'+GridProps.Width+'"'):"";HtmlTags+=HtmlTagsStyle+'"';this.htmlTags=gx.text.trim(HtmlTags);this.grid.gxHtmlTags=this.htmlTags;if(!eo(GridProps.Width)){this.grid.gxWidth=GridProps.Width}if(!eo(GridProps.Height)){this.grid.gxHeight=GridProps.Height}};this.setGridStyles=function(props){this.visible=(props.Visible!=undefined)?gx.lang.gxBoolean(props.Visible):true;
this.setSortable(((props.Sortable!=undefined)?gx.lang.gxBoolean(props.Sortable):true));this.background=(props.Background!=undefined)?props.Background:"";this.cssClass=(props.Class!=undefined)?props.Class:"";this.titleBackstyle=(props.Backcolorstyle!=undefined)?props.Backcolorstyle:gx.grid.styles.none;this.titleFont=(props.Titlefont!=undefined)?props.Titlefont:"";this.linesFont=(props.Linesfont!=undefined)?props.Linesfont:"";this.borderWidth=(props.Borderwidth!=undefined)?props.Borderwidth:"";this.toolTipText=(props.Tooltiptext!=undefined)?props.Tooltiptext:"";try{this.backcolor=(props.Backcolor!=undefined)?gx.color.html(props.Backcolor).Html:"";this.titleBackcolor=(props.Titlebackcolor!=undefined)?gx.color.html(props.Titlebackcolor).Html:"";this.titleForecolor=(props.Titleforecolor!=undefined)?gx.color.html(props.Titleforecolor).Html:"";this.linesBackcolorOdd=(props.Backcolorodd!=undefined)?gx.color.html(props.Backcolorodd).Html:"";this.linesBackcolorEven=(props.Backcoloreven!=undefined)?gx.color.html(props.Backcoloreven).Html:"";this.bordercolor=(props.Bordercolor!=undefined)?gx.color.html(props.Bordercolor).Html:""}catch(e){gx.dbg.logEx(e,"gxgrid.js","setGridStyles")}this.borderWidth=(props.Borderwidth!=undefined)?props.Borderwidth:"";this.toolTipText=(props.Tooltiptext!=undefined)?props.Tooltiptext:"";this.grid.gxCssClass="";this.grid.gxTitleClass="";this.grid.gxFooterClass="";this.grid.gxOddLlinesClass="";this.grid.gxEvenLinesClass="";this.grid.gxBackColor=this.backcolor;this.grid.gxTitleBackColor=this.titleBackcolor;this.grid.gxTitleForeColor=this.titleForecolor;this.grid.gxTitleBackstyle=this.titleBackstyle;this.grid.gxTitleFont=this.titleFont;this.grid.gxLinesFont=this.linesFont;this.grid.gxBackground=this.background;this.grid.gxLinesBackcolorOdd=this.linesBackcolorOdd;this.grid.gxLinesBackcolorEven=this.linesBackcolorEven;this.grid.gxBorderWidth=this.borderWidth;this.grid.gxBordercolor=this.bordercolor;this.grid.gxToolTipText=this.toolTipText;this.grid.gxVisible=this.visible;if(this.cssClass!=""){this.grid.gxCssClass=this.cssClass;this.grid.gxTitleClass=this.cssClass+"Title";this.grid.gxFooterClass=this.cssClass+"Footer";if(this.titleBackstyle==gx.grid.styles.none){this.grid.gxOddLlinesClass=this.cssClass+"Odd";this.grid.gxEvenLinesClass=this.grid.gxOddLlinesClass}else{if(this.titleBackstyle==gx.grid.styles.uniform){this.grid.gxOddLlinesClass=this.cssClass+"Uniform";this.grid.gxEvenLinesClass=this.grid.gxOddLlinesClass}else{if(this.titleBackstyle==gx.grid.styles.header){this.grid.gxOddLlinesClass=this.cssClass+"Odd";this.grid.gxEvenLinesClass=this.grid.gxOddLlinesClass}else{if(this.titleBackstyle==gx.grid.styles.report){if(this.isFreestyle&&(this.gridCols<=0)){this.grid.gxOddLlinesClass=this.cssClass+"Odd";this.grid.gxEvenLinesClass=this.grid.gxOddLlinesClass}else{this.grid.gxOddLlinesClass=this.cssClass+"Odd";this.grid.gxEvenLinesClass=this.cssClass+"Even"}}}}}}};this.setSortable=function(sortable){if(this.sortable!=sortable){this.sortable=sortable;
var len=this.grid.columns.length;for(var i=0;i<len;i++){this.grid.columns[i].sortable=sortable}}};this.lastRowId=0;this.addRow=function(rowProps){var rowId=this.lastRowId++;var gxRowIdx=gx.grid.rowId(rowId+1);var row=new gx.grid.row(rowId,rowProps,gxRowIdx,this.grid.gxParentRowId);row.gxCmpContext=this.gxComponentContext;row.Grids=rowProps.Grids;row.ownerGrid=this;row.gxLvl=this.gridLvl;this.setRowHiddens(rowProps.Hiddens);var columns=this.grid.columns;var len=columns.length;for(var i=0;i<len;i++){var column=columns[i];var colProps=rowProps.Props[i];var colValue=colProps[colProps.length-1];row.values[i]=colValue;if(this.parentObject.isTransaction()){var idxInKey=this.columnIndexInKey(column.gxAttId);if(idxInKey!=-1){row.gxKeyValues[idxInKey]=colValue}}}if(this.isFreestyle){row.IsNew=true;this.installChildGrids(row)}this.grid.addRow(row);return row};this.installChildGrids=function(row){var len=this.childGrids.length;for(var i=0;i<len;i++){var gxChildGrid=this.childGrids[i];var rowGrid=gxChildGrid.gxCreateGridCode(row.gxId);rowGrid.grid.parentGxObject=this.parentObject;var cntName=this.grid.gxCmpContext+rowGrid.realGridName+"Container";rowGrid.gxContainerDivName=cntName+"Div_"+row.gxId;rowGrid.gxContainerDataName=cntName+"Data_"+row.gxId;rowGrid.gxContainerValuesName=cntName+"DataV_"+row.gxId;row.gxGrids.push(rowGrid);rowGrid.parentGrid=this;rowGrid.parentRow=row;this.parentObject.setGrid(rowGrid);gxChildGrid.copyPropertiesTo(rowGrid);rowGrid.grid.gxCmpContext=this.grid.gxCmpContext;rowGrid.grid.gxParentRowId=row.gxId;this.installChildGridColumns(rowGrid,gxChildGrid)}};this.installChildGridColumns=function(Grid,gxChildGrid){var len=gxChildGrid.gxAddColumnsCode.length;for(var i=0;i<len;i++){gxChildGrid.gxAddColumnsCode[i].call(Grid)}};this.copyPropertiesTo=function(RowGrid){RowGrid.cssClass=this.cssClass;RowGrid.titleBackstyle=this.titleBackstyle;RowGrid.titleBackcolor=this.titleBackcolor;RowGrid.linesBackcolorOdd=this.linesBackcolorOdd;RowGrid.linesBackcolorEven=this.linesBackcolorEven;RowGrid.grid.gxCssClass=this.grid.gxCssClass;RowGrid.grid.gxTitleClass=this.grid.gxTitleClass;RowGrid.grid.gxOddLlinesClass=this.grid.gxOddLlinesClass;RowGrid.grid.gxEvenLinesClass=this.grid.gxEvenLinesClass;RowGrid.grid.gxAllowCollapsing=this.grid.gxAllowCollapsing;RowGrid.grid.gxCollapsed=this.grid.gxCollapsed};this.setRowHiddens=function(hiddens){if(hiddens&&this.parentObject.isTransaction()){for(var name in hiddens){gx.fn.setHidden(name,hiddens[name])}}};this.executeEvent=function(EventName,rowId){gx.evt.setGridEvt(this.gridId.toString(),rowId);this.instanciateRow(rowId);this.parentObject[EventName].call(this.parentObject,rowId)};this.updatePagingVars=function(Eof,FirstRecordOnPage){if(this.grid.usePaging){if(Eof==undefined&&FirstRecordOnPage==undefined){this.grid.eof=gx.fn.getHidden(this.grid.gxCmpContext+this.grid.gxGridName.toUpperCase()+"_nEOF");this.grid.firstRecordOnPage=gx.fn.getHidden(this.grid.gxCmpContext+this.grid.gxGridName.toUpperCase()+"_nFirstRecordOnPage")
}else{this.grid.eof=Eof;this.grid.firstRecordOnPage=FirstRecordOnPage}}};this.clearDefaultEventHandlers=function(){var len=0;if(this.defaultDragable||this.defaultSetsContext){len=this.grid.rows.length;for(var i=0;i<len;i++){var trId=this.containerName+"Row_"+this.grid.rows[i].gxId;if(this.defaultDragable){gx.fx.dnd.deleteSource(trId)}if(this.defaultSetsContext){gx.fx.ctx.deleteSetter(trId)}}}len=this.grid.columns.length;for(var i=0;i<len;i++){var currCol=this.grid.columns[i];if(currCol.gxSetsContext==true){var len1=this.grid.rows.length;for(var j=0;j<len1;j++){gx.fx.ctx.deleteSetter(currCol.htmlName+"_"+this.grid.rows[j].gxId)}}}};this.setDefaultEventHandlers=function(){var outerThis=this;var len=0;if(this.defaultDragable||this.defaultSetsContext){if(!gx.lang.emptyObject(this.boundedCollType)){var divId=this.grid.gxCmpContext+this.containerName+"Div";if(this.defaultDragable){gx.fx.dnd.addSource(this.parentObject,divId,this.cssClass,[this.boundedCollType],function(){return outerThis.returnGridData()})}if(this.defaultSetsContext){gx.fx.ctx.addSetter(this.parentObject,divId,this.cssClass,[this.boundedCollType],function(){return outerThis.returnGridData()})}}else{var evtTypes=this.getRowAsTypes();len=this.grid.rows.length;for(var i=0;i<len;i++){var trId=this.gxComponentContext+this.containerName+"Row_"+this.grid.rows[i].gxId;var rowCtrl=gx.dom.el(trId);if(rowCtrl!=null){rowCtrl.gxGrid=this.containerName;rowCtrl.gxGridName=this.gridName;rowCtrl.gxId=this.grid.rows[i].gxId;trId=this.containerName+"Row_"+this.grid.rows[i].gxId;if(this.defaultDragable){gx.fx.dnd.addSource(this.parentObject,trId,this.cssClass,evtTypes,function(rCtrl){return outerThis.returnRowData(rCtrl)})}if(this.defaultSetsContext){gx.fx.ctx.addSetter(this.parentObject,trId,this.cssClass,evtTypes,function(rCtrl){return outerThis.returnRowData(rCtrl)})}}}}}len=this.grid.columns.length;for(var i=0;i<len;i++){var currCol=this.grid.columns[i];if(currCol.gxSetsContext==true){var len1=this.grid.rows.length;for(var j=0;j<len1;j++){var cellCtrl=gx.dom.el(this.gxComponentContext+currCol.htmlName+"_"+this.grid.rows[j].gxId);if(cellCtrl!=null){cellCtrl.gxHtmlName=currCol.htmlName;gx.fx.ctx.addSetter(this.parentObject,currCol.htmlName+"_"+this.grid.rows[j].gxId,"",[currCol.gxAttName],this.returnColumnContext)}}}}};this.returnColumnContext=function(colControl){var Value="";if(colControl.nodeName=="SPAN"){Value=gx.dom.spanValue(colControl)}else{Value=gx.fn.getControlValue_impl(colControl.id)}if(Value!=null){return Value}return""};this.returnRowData=function(rowCtrl){var dragObj={};var row=this.grid.getRowByGxId(rowCtrl.gxId);if(row){var len=this.grid.columns.length;for(var i=0;i<len;i++){var colAttName=this.grid.columns[i].gxAttName;if(colAttName!=""){dragObj[colAttName]=row.values[i]}}}return dragObj};this.returnGridData=function(){var gridData=[];var len=this.grid.rows.length;for(var i=0;i<len;i++){var dragObj={};gridData[i]=dragObj;var row=this.grid.rows[i];var len1=this.grid.columns.length;for(var j=0;
j<len1;j++){var colAttName=this.grid.columns[j].gxAttName;if(colAttName!=""){dragObj[colAttName]=row.values[j]}}}return gridData};this.doDrop=function(dropObj){var rowsQty=(dropObj.length!=undefined)?ropObj.length:1;this.getNewRows(rowsQty,null,function(rows){this.addDropedRows(rows,dropObj)})};this.addDropedRows=function(rowsProps,dropObj){var len=dropObj.length;if(len!=undefined){for(var i=0;i<len;i++){this.setDroppedRow(rowsProps[i],dropObj[i])}}else{this.setDroppedRow(rowsProps[0],dropObj)}this.setNewRows(rowsProps)};this.setDroppedRow=function(rowProps,dropRow){var len=this.grid.columns.length;for(var i=0;i<len;i++){var colProps=rowProps.Props[i];var colAttName=this.grid.columns[i].gxAttName;var droppedValue="";if((colAttName!="")&&(dropRow[colAttName]!=undefined)){droppedValue=dropRow[colAttName]}colProps.Value=droppedValue;colProps.FormattedValue=droppedValue}};this.getRowAsTypes=function(){var types=[];var len=this.grid.columns.length;for(var i=0;i<len;i++){var colAttName=this.grid.columns[i].gxAttName;if(colAttName!=""){types.push(colAttName)}}return types};this.addRows=function(rowsProps){var len=rowsProps.Count;for(var i=0;i<len;i++){var rowProps=rowsProps[i];this.addRow(rowProps)}};this.lastRowIsModified=function(){if(this.grid.rows.length==0){return false}var lastRow=this.grid.rows[this.grid.rows.length-1];if(lastRow.gxExists()){return true}if(!lastRow.gxIsMod()){return false}else{return true}};this.getNewRows=function(rows,event,handler){var newRowHdl=(handler!=undefined)?handler:this.setNewRows;var keyEvent=gx.util.browser.isFirefox()?"keypress":"keydown";if(event==null||(((event.type==keyEvent&&(event.charCode==32||event.keyCode==32||event.keyCode==13))||event.type=="click")&&(this.grid.rows.length==0||this.lastRowIsModified()))){gx.csv.pkDirty=false;gx.ajax.newRows(this.gxComponentContext,this.isMasterPageGrid,this.realGridName,rows+this.lastRowId,this.lastRowId+1,(gx.grid.rowId(this.lastRowId+1)+this.grid.gxParentRowId),this.grid.gxParentRowId,newRowHdl);gx.csv.pkDirty=false;gx.evt.cancel(event,true)}else{if((event!=null)&&((event.keyCode==32)||(event.keyCode==13))){gx.evt.cancel(event,true)}}};this.setNewRows=function(rowProps){if(rowProps.Count!=undefined){var i=0;for(i=0;i<rowProps.Count;i++){var row=this.addRow(rowProps[i]);gx.fn.setCurrentGridRow(this.gridId,row.gxId)}if(rowProps.Count>0){this.addingRows=true;this.refreshGrid(false);this.addingRows=false;this.setFocusFirstControl(rowProps[0])}}};this.gxNewRowFocused=function(Ctrl){Ctrl.style.textDecoration="underline";var firstGridCtrl=gx.fn.firstGridControl(this.gridId);gx.evt.onfocus(Ctrl,firstGridCtrl,this.gxComponentContext,this.isMasterPageGrid,"9999",this.gridId)};this.rowKeyPressed=function(keyEvent){var eventSource=gx.evt.source(keyEvent);if(eventSource!=undefined){if(keyEvent.ctrlKey&&keyEvent.keyCode==46){this.setRowDeleted(eventSource);gx.evt.cancel(keyEvent,true)}}};this.gxHasDuplicateKey=function(){var keys=[];var rows=this.grid.rows;var len=rows.length;for(var i=0;
i<len;i++){var row=rows[i];if((row.gxExists()||row.gxIsMod())&&!row.gxDeleted()){var rowKey="";var len1=row.gxKeyValues.length;for(var j=0;j<len1;j++){rowKey+=row.gxKeyValues[j].toString()}if(keys[rowKey]!=undefined){return true}keys[rowKey]=1}}return false};this.columnIndexInKey=function(colIdx){var len=this.lvlKey.length;for(var i=0;i<len;i++){if(this.lvlKey[i]==colIdx){return i}}return -1};this.refreshVars=[];this.addRefreshingVar=function(validStruct){if(gx.lang.emptyObject(validStruct)){return}var eventThis=this;var eventName="";this.refreshVars[this.refreshVars.length]=validStruct;if(validStruct.fld){var varCtrl=gx.dom.el(this.gxComponentContext+validStruct.fld);if(varCtrl!=undefined){if(gx.lang.emptyObject(validStruct.hc)){if(varCtrl.tagName=="SELECT"){eventName="change"}else{if(varCtrl.type=="checkbox"||varCtrl.type=="radio"){eventName="click"}else{if(!gx.lang.isNumericType(validStruct.type)){eventName="keyup"}}}if(eventName!=""){if(varCtrl.type=="radio"){var radioGroup=gx.dom.byName(this.gxComponentContext+validStruct.fld);var len=radioGroup.length;for(var i=0;i<len;i++){gx.evt.attach(radioGroup[i],eventName,function(){eventThis.filterVarChanged()})}}else{gx.evt.attach(varCtrl,eventName,function(){eventThis.filterVarChanged()})}}}}}};this.filterVarChanged=function(){if(this.parentObject.autoRefresh&&!gx.grid.drawAtServer){var refreshParms=this.getRefreshParmsUrl();if(this.lastRefreshParms!=refreshParms){this.lastRefreshParms=refreshParms;this.callAsyncRefresh(refreshParms)}}else{this.parentObject.conditionsChanged=this.conditionsChanged()}};this.conditionsChanged=function(){var varsLen=this.refreshVars.length;for(var i=0;i<varsLen;i++){var vStruct=this.refreshVars[i];if(typeof(vStruct.rfrVar)=="undefined"){var oldValue=gx.fn.getHidden(this.gxComponentContext+"GXH_"+vStruct.fld);var newValue=vStruct.val();if(oldValue!=newValue){return true}}}return false};this.getRefreshParmsUrl=function(){var refreshParms="";if(this.pageSizeParm){refreshParms=this.grid.pageSize+","}var varsLen=this.refreshVars.length;for(var i=0;i<varsLen;i++){var vStruct=this.refreshVars[i];if(typeof(vStruct.rfrVar)!="undefined"){var filterValue=undefined;var ctrlName=undefined;if(typeof(vStruct.rfrProp)!="undefined"){var col=this.grid.getColumnForVar(vStruct.rfrVar);if(col){var propName=vStruct.rfrProp.toLowerCase();filterValue=col[propName];if(propName=="value"&&col.gxControl.type==gx.html.controls.types.image){filterValue=gx.util.removeBaseUrl(filterValue)}}else{filterValue=""}}else{if(typeof(this.parentObject.VarControlMap[vStruct.rfrVar])!="undefined"){ctrlName=this.parentObject.VarControlMap[vStruct.rfrVar].id}if(typeof(ctrlName)!="undefined"){filterValue=gx.fn.getHidden(this.gxComponentContext+ctrlName)}if(typeof(filterValue)=="undefined"){filterValue=this.parentObject[vStruct.rfrVar]}if(typeof(filterValue)=="object"){filterValue=gx.json.serializeJson(filterValue)}}refreshParms+=encodeURIComponent(filterValue)+","}else{if(!gx.lang.emptyObject(vStruct.hc)){refreshParms+=encodeURIComponent(this.parentObject[vStruct.hc])+","
}else{refreshParms+=this.getFormattedParm(vStruct)+","}gx.fn.setHidden(this.gxComponentContext+"GXH_"+vStruct.fld,vStruct.val())}}if(this.parentObject.IsComponent){refreshParms+=encodeURIComponent(this.parentObject.CmpContext)+","}return refreshParms};this.initRefreshParms=function(){if(this.parentObject.autoRefresh){this.lastRefreshParms=this.getRefreshParmsUrl()}};this.getFormattedParm=function(vStruct){if(vStruct.type=="date"){var ctrl=gx.dom.el(this.gxComponentContext+vStruct.fld);return encodeURIComponent(gx.date.urlDate(ctrl,gx.dateFormat))}else{if(vStruct.type=="dtime"){var ctrl=gx.dom.el(this.gxComponentContext+vStruct.fld);return encodeURIComponent(gx.date.urlDateTime(ctrl,gx.dateFormat))}}return encodeURIComponent(vStruct.val())};this.callAsyncRefresh=function(refreshParms){var eventThis=this;if(this.refreshTimer!=null){window.clearTimeout(this.refreshTimer);this.refreshTimer=null}this.refreshTimer=window.setTimeout(function(){gx.ajax.refreshGrid(eventThis,refreshParms)},400)};this.updatePropsHidden=function(newProps){var propsCtrlName=this.getDataHiddenName();gx.fn.setHidden(propsCtrlName,newProps)};this.loadAfterRefresh=function(gridRows){var rowsLen1=this.grid.rows.length;this.blankGridRows();if(this.usePaging){var eof=this.grid.gxCmpContext+this.grid.gxGridName.toUpperCase()+"_nEOF";var firstPage=this.grid.gxCmpContext+this.grid.gxGridName.toUpperCase()+"_nFirstRecordOnPage";this.updatePagingVars(gridRows[eof],gridRows[firstPage]);gx.fn.setHidden(eof,gridRows[eof]);gx.fn.setHidden(firstPage,gridRows[firstPage])}this.addRows(gridRows);var rowsLen2=this.grid.rows.length;this.refreshGrid(null,true);gx.fx.obs.notify("grid.onafterrefresh",[this,rowsLen1,rowsLen2])};this.getSelection=function(){if(this.allowSelection){var len=this.grid.rows.length;for(var i=0;i<len;i++){var row=this.grid.rows[i];if(row.selected){return i}}}return -1};this.setSelection=function(idx){if(this.allowSelection&&idx>=0){var cRow=gx.grid.rowId(idx+1);var rowCtrl=gx.dom.el(this.grid.gxCmpContext+this.grid.gxGridObject+"Row_"+cRow);if(rowCtrl){this.grid.setRowSelected(rowCtrl,cRow)}}};this.blankGridRows=function(){this.lastRowId=0;this.grid.rows=[]};this.setRowDeleted=function(rowCtrl){var row=null;if(typeof(rowCtrl)=="string"){row=this.grid.getRowByGxId(rowCtrl)}else{row=(rowCtrl.gxId==undefined)?this.getRowFromHtmlCtrl(rowCtrl):rowCtrl}row.setDeleted(!row.gxDeleted());this.setRowModified(row.gxId);gx.fn.removeGridRow(row.gxId,this.gridId.toString());this.refreshGrid()};this.setFocusFirstControl=function(rowProps){for(var i=0;i<rowProps.Count;i++){var row=this.grid.getRowByGxId(gx.grid.rowId(this.lastRowId)+this.grid.gxParentRowId);if(row){var focusCtrl=gx.dom.el(this.grid.gxCmpContext+this.grid.columns[i].htmlName+"_"+row.gxId);if(focusCtrl!=undefined&&gx.fn.isAccepted(focusCtrl)){gx.grid.lastFocusCtrl=this.grid.columns[i].gxId;gx.fn.setFocus(focusCtrl);break}}}};this.instanciateRow=function(cRow){var bkpObj=gx.O;gx.setGxO(this.parentObject.CmpContext,this.parentObject.IsMasterPage);
try{var row=cRow;if(typeof(row)=="string"){row=this.grid.getRowByGxId(cRow)}if(row!=null){gx.fn.setCurrentGridRow(this.gridId,row.gxId);var len=row.values.length;for(var i=0;i<len;i++){var column=this.grid.columns[i];if(column.gxId!=""){var validStruct=this.parentObject.getValidStruct(column.gxId);if(validStruct){if(this.isUsercontrol){if(validStruct.v2v){validStruct.v2v(this.grid.properties[row.id][column.index].value);gx.fn.setHidden(this.grid.properties[row.id][column.index].id,this.grid.properties[row.id][column.index].value)}}else{if(typeof(validStruct.c2v)=="function"){validStruct.c2v()}}}}}}else{gx.fn.setCurrentGridRow(this.gridId,cRow);var len=this.grid.columns.length;for(var i=0;i<len;i++){var column=this.grid.columns[i];if(column.gxId!=""){var validStruct=this.parentObject.getValidStruct(column.gxId);if(validStruct&&typeof(validStruct.c2v)=="function"){validStruct.c2v()}}}}}catch(e){gx.dbg.logEx(e,"gxgrid.js","instanciateRow")}gx.setGxO(bkpObj.CmpContext,bkpObj.IsMasterPage);return true};this.setRenderProperty=function(PropName,HiddenName,PropValue,PropType){this.grid.setProperty(PropName,HiddenName,PropValue,PropType)};this.setRenderDynProperty=function(PropName,HiddenName,PropType){this.grid.setDynProperty(PropName,HiddenName,PropType)};this.addRenderEventHandler=function(EventName,Handler){this.grid.addEventHandler(EventName,Handler)};this.cleanup=function(){this.parentObject=null;this.parentGrid=null;this.grid.ownerGrid=null;this.grid.parentGxObject=null;this.grid.container=null;this.grid.ascLabel=null;this.grid.descLabel=null;this.grid.columns=null;this.grid.rows=null;this.grid=null};this.loadGrid=function(postProps,fromPost){var bkpObj=gx.O;gx.setGxO(this.parentObject.CmpContext,this.parentObject.IsMasterPage);this.isLoading=true;var isTrn=this.parentObject.isTransaction();if(isTrn&&this.contextMenu==null){this.contextMenu=new gx.grid.contextMenu(this)}if(postProps!=undefined){var divCtrl=this.getContainerControl();if(divCtrl!=null){if(fromPost==true){var rowsValues=this.getValuesFromHidden();this.mergeValuesWithProps(postProps,rowsValues);if(this.isFreestyle&&gx.lang.emptyObject(this.parentRow)){this.backupComponents()}}this.deleteGridData();this.grid.setContainerDelayed(divCtrl);this.clearHiddens();this.setRowsProperty();var sel=this.getSelection();this.blankGridRows();this.setHtmlTags(postProps);this.setGridStyles(postProps);this.setDeleteMethod(postProps.DeleteMethod);this.setSelectionAndHover(postProps.Allowselection,postProps.Selectioncolor,postProps.Allowhover,postProps.Hovercolor);this.setCollapsing(postProps.Allowcollapsing,postProps.Collapsed);this.setSflColumns(postProps.SflColumns);this.setColumnsProperties(postProps.Columns);this.updatePagingVars();this.addRows(postProps);this.updateOldComponents();this.initRefreshParms();this.refreshGrid();this.setSelection(sel)}}else{this.clearHiddens();this.setRowsProperty();this.grid.pageSize=(isTrn||this.isFreestyle)?9999:this.gridRows;var divCtrl=this.getContainerControl();if(divCtrl!=null){this.grid.setContainerDelayed(divCtrl);
var rowsProps=this.getRowsFromHidden();if(rowsProps!=null){this.blankGridRows();this.setHtmlTags(rowsProps);this.setGridStyles(rowsProps);this.setDeleteMethod(rowsProps.DeleteMethod);this.setSelectionAndHover(rowsProps.Allowselection,rowsProps.Selectioncolor,rowsProps.Allowhover,rowsProps.Hovercolor);this.setCollapsing(rowsProps.Allowcollapsing,rowsProps.Collapsed);this.setSflColumns(rowsProps.SflColumns);this.setColumnsProperties(rowsProps.Columns);this.updatePagingVars();this.addRows(rowsProps);this.initRefreshParms();this.addingRows=true;this.refreshGrid();this.addingRows=false}else{this.blankGridRows();this.updatePagingVars();this.initRefreshParms();this.refreshGrid()}}else{this.loadWrappedGridChilds()}}this.isLoading=false;gx.setGxO(bkpObj.CmpContext,bkpObj.IsMasterPage)};this.loadWrappedGridChilds=function(){try{var rows=gx.fn.getHidden(this.grid.gxCmpContext+"nRC_"+this.gridName);if(typeof(rows)!="undefined"){rows=parseInt(rows);for(var i=0;i<rows;i++){var len=this.grid.columns.length;for(var j=0;j<len;j++){var column=this.grid.columns[j];if(column.gxControl.type==gx.html.controls.types.userControl){this.addUsercontrolToDraw({r:gx.grid.rowId(i+1),c:column})}}}this.setupGridUsercontrols(this.GridUserControls)}}catch(e){gx.dbg.logEx(e,"gxgrid.js","loadWrappedGridChilds")}};this.getRowsFromHidden=function(){var propsCtrlName=this.getDataHiddenName();var ctrlsProps=gx.fn.getHidden(propsCtrlName);var rowsProps=null;if(!gx.lang.emptyObject(ctrlsProps)){gx.json.setNonSerializable(propsCtrlName);rowsProps=gx.json.evalJSON(ctrlsProps)}else{return null}var rowsValues=this.getValuesFromHidden();this.mergeValuesWithProps(rowsProps,rowsValues);return rowsProps};this.deleteGridData=function(){var propsCtrlName=this.getDataHiddenName();gx.json.setNonSerializable(propsCtrlName)};this.getValuesFromHidden=function(){var valCtrlId=this.getValuesHiddenName();var ctrlsValues=gx.fn.getHidden(valCtrlId);if(gx.lang.emptyObject(ctrlsValues)){ctrlsValues=gx.fn.getControlValue(valCtrlId)}gx.json.setNonSerializable(valCtrlId);var rowsValues=null;if(ctrlsValues!=null&&ctrlsValues!=""){rowsValues=gx.json.evalJSON(ctrlsValues)}return rowsValues};this.mergeValuesWithProps=function(props,values){if(values){var len=props.Count;if(!len){return}for(var i=0;i<len;i++){var rowProps=props[i].Props;var rowValues=values[i];if(!rowValues){continue}var len1=rowProps.length;for(var j=0;j<len1;j++){rowProps[j].push(rowValues[j])}}}};this.getContainerControl=function(){var divCtrl=null;if(this.gxContainerDivName!=undefined){divCtrl=gx.dom.byId(this.gxContainerDivName)}else{divCtrl=gx.dom.byId(this.grid.gxCmpContext+this.containerName+"Div")}if(divCtrl){this.gxContainerCtrl=divCtrl;divCtrl.setAttribute("gxgridid",this.gridId.toString());divCtrl.gxGridName=this.grid.gxGridName}return divCtrl};this.getDataHiddenName=function(){var ctrlSuffix=(this.grid.gxParentRowId=="")?"":"_"+this.grid.gxParentRowId;var ctrlName="";if(this.gxContainerDataName!=undefined){ctrlName=this.gxContainerDataName
}else{ctrlName=this.grid.gxCmpContext+this.containerName+"Data"+ctrlSuffix}return ctrlName};this.getValuesHiddenName=function(){var ctrlSuffix=(this.grid.gxParentRowId=="")?"":"_"+this.grid.gxParentRowId;var ctrlName="";if(this.gxContainerValuesName!=undefined){ctrlName=this.gxContainerValuesName}else{ctrlName=this.grid.gxCmpContext+this.containerName+"DataV"+ctrlSuffix}return ctrlName};this.setColumnsProperties=function(props){try{var len=props.length;for(var i=0;i<len;i++){var col=this.grid.columns[i];for(var prop in props[i]){var pValue=props[i][prop];prop=this.fixColumnPropName(prop);if(this.isUsercontrol){col[prop]=pValue}col[prop.toLowerCase()]=pValue}this.checkPromptColumn(col)}}catch(e){gx.dbg.logEx(e,"gxgrid.js","setColumnsProperties")}};this.checkPromptColumn=function(col){try{if(this.isPromptColumn(col)){var ctrl=gx.fn.getAttachedCtrl(col.htmlName);if(ctrl&&ctrl.info&&ctrl.info.controls){var anyVisible=false;var anyEnabled=false;var depLen=ctrl.info.controls.length;for(var j=0;j<depLen;j++){var depId=ctrl.info.controls[j];var depCol=this.grid.getColumnByGxId(depId);var enabled=gx.lang.gxBoolean(depCol.enabled);var visible=gx.lang.gxBoolean(depCol.visible);if(enabled){anyEnabled=true}if(visible){anyVisible=true}}if(!anyEnabled){col.enabled="0"}if(!anyVisible){col.visible="0"}}}}catch(e){gx.dbg.logEx(e,"gxgrid.js","checkPromptColumn")}};this.fixColumnPropName=function(propName){if(propName=="Horizontalalignment"){return"align"}return propName};this.setDeleteMethod=function(deleteMethod){var isTrn=this.parentObject.isTransaction();if(isTrn){var disableDelete=(this.parentObject.Gx_mode=="DSP");if(!disableDelete&&deleteMethod&&(deleteMethod=="none")){disableDelete=true}if(disableDelete){this.deleteMethod=gx.grid.deleteMethods.none}else{this.deleteMethod=gx.grid.deleteMethod}}};this.setSelectionAndHover=function(Allowselection,Selectioncolor,Allowhover,Hovercolor){try{this.allowSelection=(Allowselection=="true")?true:false;this.selectionColor=null;this.allowHovering=false;this.hoverColor=null;if(this.allowSelection){this.allowHovering=(Allowhover=="true")?true:false;Selectioncolor=eval(Selectioncolor);if(typeof(Selectioncolor[0])!="undefined"){this.selectionColor=gx.color.fromRGB(Selectioncolor[0],Selectioncolor[1],Selectioncolor[2])}else{this.selectionColor=gx.color.html(Selectioncolor)}if(this.allowHovering){Hovercolor=eval(Hovercolor);if(typeof(Hovercolor[0])!="undefined"){this.hoverColor=gx.color.fromRGB(Hovercolor[0],Hovercolor[1],Hovercolor[2])}else{this.hoverColor=gx.color.html(Hovercolor)}}}this.grid.gxAllowSelection=this.allowSelection;this.grid.gxSelectionColor=this.selectionColor;this.grid.gxAllowHovering=this.allowHovering;this.grid.gxHoverColor=this.hoverColor}catch(e){gx.dbg.logEx(e,"gxgrid.js","setSelectionAndHover")}};this.setCollapsing=function(Allowcollapsing,Collapsed){try{this.allowCollapsing=(Allowcollapsing=="true")?true:false;this.collapsed=(Collapsed==0)?false:true;this.grid.gxAllowCollapsing=this.allowCollapsing;this.grid.gxCollapsed=this.collapsed
}catch(e){gx.dbg.logEx(e,"gxgrid.js","setCollapsing")}};this.setSflColumns=function(sflColumns){try{if(!gx.lang.emptyObject(sflColumns)){this.gridCols=parseInt(sflColumns);this.grid.gxGridCols=this.gridCols;if(this.gridCols>1&&this.gridRows>0){this.grid.pageSize=(this.gridRows?this.gridRows:1)*this.gridCols}}}catch(e){gx.dbg.logEx(e,"gxgrid.js","setSflColumns")}};this.isPromptColumn=function(column){if(column.gxAttId.indexOf&&column.gxAttId.indexOf("prompt_")!=-1){return true}return false};this.setRowsProperty=function(){var rowsHiddenValue=gx.fn.getHidden(this.grid.gxCmpContext+this.gridName.toUpperCase()+"_Rows");if(rowsHiddenValue!=null){try{this.gridRows=parseInt(rowsHiddenValue,10)}catch(e){gx.dbg.logEx(e,"gxgrid.js","setRowsProperty")}this.grid.pageSize=this.gridRows*(this.gridCols>1?this.gridCols:1)}};this.crearInstalledSuggests=function(){var len=this.grid.columns.length;for(var i=0;i<len;i++){var column=this.grid.columns[i];var vStruct=this.parentObject.getValidStructFld(column.htmlName);if(vStruct&&vStruct.gxsgprm&&vStruct.gxsgprm.installed){vStruct.gxsgprm.installed={}}}};this.refreshCollection=function(coll){try{this.blankGridRows();this.updatePagingVars();this.initRefreshParms();var cLen=coll.length;for(var i=0;i<cLen;i++){var rowProps={Props:[]};var collItem=coll[i];var len=this.grid.columns.length;for(var j=0;j<len;j++){var column=this.grid.columns[j];rowProps.Props[column.index]=[collItem[column.gxAttName]]}this.addRow(rowProps)}this.refreshGrid(false,false,true)}catch(e){gx.dbg.logEx(e,"gxgrid.js","refreshCollection")}};this.refreshGrid=function(loadChildGrids,fromAutoRefresh,fromCollection){this.DatePickersControls=[];this.GridUserControls=[];this.GridComponents=[];this.GridControls=[];this.clearDefaultEventHandlers();this.clearHiddens();this.crearInstalledSuggests();this.setRowsProperty();if((this.parentRow!=undefined)&&(this.parentRow.Grids!=undefined)){var gridProps=this.parentRow.Grids[this.realGridName];if(gridProps!=null){this.setHtmlTags(gridProps);this.setGridStyles(gridProps);this.setColumnsProperties(gridProps.Columns);if(!this.addingRows){if(this.parentRow.IsNew){this.addRows(gridProps)}}}}var firstTime=false;var afterRender=function(){this.setupGridControls(this.GridControls);this.setupGridComponents(this.GridComponents);this.setupGridUsercontrols(this.GridUserControls);this.triggerDatePickersSetup(this.DatePickersControls);if(this.isFreestyle){this.loadRowsGrids(firstTime)}this.updateRcdCount();this.setDefaultEventHandlers()};afterRender=afterRender.closure(this);if(loadChildGrids==false){this.grid.render(firstTime,false,fromCollection,afterRender)}else{firstTime=true;this.grid.render(firstTime,fromAutoRefresh,fromCollection,afterRender)}};var CMP_BACKUP_CONTAINER_ID="gx-wc-bkp";this.getComponentsBackupContainer=function(){var bkpCt=gx.dom.el(CMP_BACKUP_CONTAINER_ID);if(!bkpCt){bkpCt=document.createElement("div");bkpCt.id=CMP_BACKUP_CONTAINER_ID;bkpCt.style.display="none";document.body.appendChild(bkpCt)}return bkpCt
};this.destroyComponentsBackup=function(){var bkpCt=gx.dom.el(CMP_BACKUP_CONTAINER_ID);if(bkpCt){var parent=bkpCt.parentNode;if(parent){parent.removeChild(bkpCt)}}};this.backupComponents=function(){try{var len1=this.grid.rows.length;for(var i=0;i<len1;i++){var row=this.grid.rows[i];var len2=this.grid.columns.length;for(var j=0;j<len2;j++){var column=this.grid.columns[j];if(column.gxControl.type==gx.html.controls.types.webComponent){var cmpProps=row.gxProps[j];var controlName=cmpProps[0];var cmpPrefix=this.parentObject.getComponentPrefix(controlName);var cmpCtrlId=this.gxComponentContext+"gxHTMLWrp"+cmpPrefix+row.gxId;var cmpCtrl=gx.dom.el(cmpCtrlId);if(cmpCtrl){cmpCtrl.parentNode.removeChild(cmpCtrl);var bkpCt=this.getComponentsBackupContainer();bkpCt.appendChild(cmpCtrl)}}}var len3=row.gxGrids.length;for(var k=0;k<len3;k++){var rowGrid=row.gxGrids[k];if(rowGrid&&rowGrid.isFreestyle){rowGrid.backupComponents()}}}}catch(e){gx.dbg.logEx(e,"gxgrid.js","backupComponents")}};this.setupGridControls=function(GridControls){for(var i=0,len=GridControls.length;i<len;i++){var ctrl=GridControls[i];var hook=gx.dom.el(ctrl.hookId);var parent=hook.parentNode;if(parent){parent.removeChild(hook);parent.appendChild(ctrl.el)}}};this.setupGridComponents=function(GridComponents){var len=GridComponents.length;for(var i=0;i<len;i++){var cmp=GridComponents[i];if(cmp.create===false){var hook=gx.dom.el(cmp.existingEl);var parent=hook.parentNode;var el=gx.dom.el(cmp.el);parent.removeChild(hook);parent.appendChild(el)}else{gx.html.processCode(cmp.c,false,function(obj){var gxComp=gx.createComponent(obj.n,obj.p);if(gxComp!=null){gx.addComponent(gxComp);gxComp.readServerVars();if(obj.load){gxComp.onload()}}},[cmp])}}this.destroyComponentsBackup()};this.setupGridUsercontrols=function(GridUserControls){var len=GridUserControls.length;for(var i=0;i<len;i++){var rowId=GridUserControls[i].r;var col=GridUserControls[i].c;var userControl=gx.uc.getNew(this.parentObject,col.gxUCId,col.gxUCLastId,col.gxUCClassName,col.gxUCContainerName+"_"+rowId,col.gxUCControlName,this.gridLvl,this.gridId,rowId);userControl.DesignContainerName=col.gxUCContainerName;userControl.setC2ShowFunction(col.gxShowFunc);var len1=col.gxC2VFuncs.length;for(var j=0;j<len1;j++){userControl.addC2VFunction(col.gxC2VFuncs[j])}var len2=col.gxV2CFuncs.length;for(var j=0;j<len2;j++){userControl.addV2CFunction(col.gxV2CFuncs[j])}userControl.setGridProperties();userControl.setGridEventHandlers();this.parentObject.setUserControl(userControl);userControl.execV2CFunctions();userControl.execShowFunction()}};this.triggerDatePickersSetup=function(DatePickersControls){var len=DatePickersControls.length;for(var j=0;j<len;j++){var controlId=DatePickersControls[j].CtrlId;var controlGrid=DatePickersControls[j].Grid;var controlRow=DatePickersControls[j].Row;var currentObject=gx.O;var validStruct=null;var ctrlIds=gx.fn.controlIds();var len1=ctrlIds.length;for(var i=0;i<len1;i++){validStruct=gx.fn.validStruct(ctrlIds[i]);if(validStruct.grid==controlGrid){var vControlId=currentObject.CmpContext+validStruct.fld+"_"+controlRow;
if(vControlId==controlId){break}}}if((validStruct!=null)&&(validStruct.dp!=undefined)){gx.fn.installDatePicker(controlId,validStruct.dp.f,validStruct.dp.st,validStruct.dp.wn,validStruct.dp.mf,gx.fn.datePickerFormat(validStruct.dp.pic,validStruct.dp.dec,validStruct.len))}}};this.addComponentToDraw=function(cmpObj){this.GridComponents.push(cmpObj)};this.addUsercontrolToDraw=function(ucObj){this.GridUserControls.push(ucObj)};this.addDatepickerToSetup=function(dpObj){this.DatePickersControls.push(dpObj)};this.addControlToReuse=function(ctrl){var parent=ctrl.el.parentNode;if(parent){parent.removeChild(ctrl.el)}this.GridControls.push(ctrl)};this.loadRowsGrids=function(firstTime){var len=this.grid.rows.length;for(var i=0;i<len;i++){this.loadRowGrids(this.grid.rows[i],firstTime)}};this.loadRowGrids=function(row,firstTime){var len=row.gxGrids.length;for(var i=0;i<len;i++){var rowGrid=row.gxGrids[i];rowGrid.grid.setContainerDelayed(gx.dom.el(rowGrid.gxContainerDivName));if(firstTime){rowGrid.loadGrid()}else{rowGrid.refreshGrid()}row.IsNew=false}};this.updateRcdCount=function(){if(this.hasForEachLine||this.parentObject.isTransaction()){gx.fn.setHidden(this.grid.gxCmpContext+"nRC_"+this.gridName,this.lastRowId.toString())}var rowId=gx.fn.getHidden(this.grid.gxCmpContext+this.gridName.toUpperCase()+"_ROW");if(parseInt(rowId,10)>this.lastRowId){this.grid.instanciateSelectionVars("0000")}};this.updateControlValue=function(vStruct,modifRow){try{var gxgrid=this;var cRow=gx.fn.currentGridRow(vStruct.grid).toString();var iRow=cRow;var rLen=cRow.length;if(rLen>4){var pRow=cRow.substring(4,rLen);gxgrid=gx.fn.gridObj(this.gxComponentContext,this.gridName+"_"+pRow,this.isMasterPageGrid);if(!gxgrid){return}iRow=cRow.substring(0,4)}var gridRow=parseInt(iRow,10)-1;if(modifRow==true){gxgrid.setRowModified(cRow)}var colIdx=gxgrid.getColumnIndexByName(vStruct.fld);var ctrl=gx.dom.el(this.gxComponentContext+vStruct.fld+"_"+cRow);gxgrid.updateRowValue(colIdx,gridRow,ctrl);return gxgrid}catch(e){gx.dbg.logEx(e,"gxgrid.js","updateControlValue")}return null};this.persistControlValue=function(ControlId,Value,validStruct){var _Idx=ControlId.lastIndexOf("_");if(_Idx!=-1){var htmlName=ControlId.substring(0,_Idx);var rowGxId=ControlId.substring(_Idx+1);var row=this.grid.getRowByGxId(rowGxId);if(row){var column=this.grid.getColumnByHtmlName(htmlName);if(column){var pValue=this.parentObject[validStruct.gxvar];if(validStruct.type=="decimal"&&gx.lang.instanceOf(pValue,Number)){pValue=pValue.toFixed(validStruct.dec)}row.values[column.index]=pValue;if(!row.gxProps[column.index]){row.gxProps[column.index]={}}var cellCtrl=gx.dom.el(ControlId);if(cellCtrl&&cellCtrl.tagName=="SELECT"){row.gxProps[column.index].Values=gx.dom.comboBoxToObj(cellCtrl)}row.gxProps[column.index].Value=pValue;row.gxProps[column.index].FormattedValue=Value}}}};this.getColumnIndexByName=function(htmlName){var cols=this.grid.columns;var len=cols.length;for(var i=0;i<len;i++){if(cols[i].htmlName==htmlName){return i}}return -1
};this.setRowModified=function(cRow){gx.fn.setHidden(this.grid.gxCmpContext+"nIsMod_"+this.gridLvl.toString()+"_"+cRow,1);if(this.parentGrid!=null){this.parentGrid.setRowModified(this.grid.gxParentRowId)}this.grid.showDeleteImage(cRow)};this.validateRow=function(eventCtrl){if(eventCtrl){try{gx.fn.setCurrentGridRow(eventCtrl.gxgridid,eventCtrl.gxrow);var lastGridCtrl=gx.fn.lastGridControl(eventCtrl.gxgridid);gx.csv.validControls(gx.csv.lastId,lastGridCtrl+1,true)}catch(e){gx.dbg.logEx(e,"gxgrid.js","validateRow")}}};this.updateRowValue=function(colIdx,rowId,ctrl){var row=this.grid.getRowById(rowId);var column=this.grid.columns[colIdx];if(ctrl.type=="checkbox"){if(ctrl.checked){ctrl.value=column.gxChecked}else{ctrl.value=column.gxUnChecked}}var ctrlVal=gx.fn.getControlValue(this.grid.columns[colIdx].htmlName+"_"+row.gxId);var validStruct=this.parentObject.getValidStructFld(this.grid.columns[colIdx].htmlName);var pValue=validStruct.val();row.values[colIdx]=pValue;if(!gx.lang.emptyObject(row.gxProps[colIdx])){row.gxProps[colIdx].Value=pValue;row.gxProps[colIdx].FormattedValue=ctrlVal}if(this.parentObject.isTransaction()){var idxInKey=this.columnIndexInKey(column.gxAttId);if(idxInKey!=-1){row.gxKeyValues[idxInKey]=pValue}}if(column.gxControl.type==gx.html.controls.types.blob){gx.fn.setControlValue(this.grid.gxCmpContext+"gxBlob"+column.htmlName+"_"+row.gxId,pValue)}};this.expandCollapse=function(imgCtrl,event){gx.evt.cancel(event,true);var gridTbl=gx.dom.el(this.gxComponentContext+this.containerName+"Tbl");if(gridTbl!=null){if(this.collapsed){gridTbl.style.display="block";imgCtrl.src=gx.util.resourceUrl(gx.basePath+gx.staticDirectory+"collapse.gif",true)}else{gridTbl.style.display="none";imgCtrl.src=gx.util.resourceUrl(gx.basePath+gx.staticDirectory+"expand.gif",true)}this.collapsed=!this.collapsed;this.grid.gxCollapsed=this.collapsed;var gridNameCollapse;if(this.parentGrid){var lastIndex=this.gridName.lastIndexOf("_");var gridNumber=this.gridName.substring(lastIndex);gridNameCollapse=this.gxComponentContext+this.realGridName.toUpperCase()+"_Collapsed"+gridNumber}else{gridNameCollapse=this.gxComponentContext+this.realGridName.toUpperCase()+"_Collapsed"}gx.fn.setHidden(gridNameCollapse,(this.collapsed)?"1":"0")}};this.getRowFromHtmlCtrl=function(rowCtrl){var rowId=rowCtrl.gxrow;if(gx.lang.emptyObject(rowId)){var _Idx=rowCtrl.id.lastIndexOf("_");rowId=rowCtrl.id.substring(_Idx+1)}return this.grid.getRowByGxId(rowId)};this.showContextMenu=function(rowCtrl,contextEvent){this.contextMenu.show(rowCtrl,contextEvent)}},contextMenu:function(b){this.gxgrid=b;this.controlName=this.gxgrid.containerName+"ContextMenu";this.rowClicked=null;this.contextEvent=null;this.eventSource=null;var a=new gx.text.stringBuffer();this.show=function(d,c){this.gxgrid.validateRow(d);this.contextEvent=c;this.eventSource=gx.evt.source(this.contextEvent);gx.evt.cancel(c,true);this.rowClicked=d;this.startMenu();a.append('<div class="').append("menuItem").append('" id="').append("deleteRow").append('" align="center">').append(gx.getMessage("GXM_deleterow")).append("</div>");
this.endMenu()};this.startMenu=function(){a.clear();var c=this.getMenuCoords();a.append('<div onclick="').append(this.gxgrid.grid.gridObject()+".contextMenu.contextMenuClicked(event);").append('" onmouseover="');a.append(this.gxgrid.grid.gridObject()+".contextMenu.switchContextMenu();").append('" onmouseout="').append(this.gxgrid.grid.gridObject()+".contextMenu.switchContextMenu();").append('" oncontextmenu="gx.evt.cancel(event, true);');a.append('" style="').append("position:absolute;width:100;background-Color:menu; border: outset 1px gray;");a.append("top:"+c.top+"; left:"+c.left+";").append('">')};this.endMenu=function(){a.append("</div>");var c=gx.dom.byId(this.controlName);if(c==null){c=document.createElement("SPAN");ContextControlShadow=document.createElement("SPAN");ContextControlShadow2=document.createElement("SPAN");IFrameControl=document.createElement("IFRAME");c.id=this.controlName;ContextControlShadow.id=this.controlName+"Shadow";ContextControlShadow2.id=this.controlName+"Shadow2";IFrameControl.id=this.controlName+"GXiFrameIEHack";IFrameControl.src="about:blank";IFrameControl.style.zIndex=1;IFrameControl.style.visibility="hidden";IFrameControl.style.position="absolute";IFrameControl.frameBorder="0";document.body.appendChild(c);document.body.appendChild(ContextControlShadow);document.body.appendChild(ContextControlShadow2);document.body.appendChild(IFrameControl)}c.innerHTML=a.toString()};this.hide=function(){this.rowClicked=null;this.contextEvent=null;gx.dom.removeControl(gx.dom.byId(this.controlName))};this.getMenuCoords=function(){var c=0;var f=0;var d=this.contextEvent;if(d.pageX||d.pageY){c=d.pageX;f=d.pageY}else{if(d.clientX||d.clientY){c=d.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=d.clientY+document.body.scrollTop+document.documentElement.scrollTop}}return{left:c,top:f}};this.contextMenuClicked=function(d){var c=gx.evt.source(d);this.handleContextMenuAction(c.id);this.hide()};this.handleContextMenuAction=function(c){switch(c){case"deleteRow":this.gxgrid.setRowDeleted(this.rowClicked);break;case"undeleteRow":this.gxgrid.setRowDeleted(this.rowClicked);break;default:break}};this.switchContextMenu=function(){}},rowId:function(a){var b=a.toString();while(b.length<4){b="0"+b}return b},_init:function(){if(!this.deleteMethod){this.deleteMethod=this.deleteMethods.images}if(this.deleteImage&&(this.deleteMethod==this.deleteMethods.images)){this.deleteImage=gx.ajax.getImageUrl(this.deleteImage)}else{this.deleteImage=gx.util.resourceUrl(gx.basePath+gx.staticDirectory+"delete_16x.jpg",true)}if(this.undeleteImage&&(this.deleteMethod==this.deleteMethods.images)){this.undeleteImage=gx.ajax.getImageUrl(this.undeleteImage)}else{this.undeleteImage=this.deleteImage}if(!this.deletePosition){this.deletePosition=this.deletePositions.left}if(!this.deletePositionFree){this.deletePositionFree=this.deletePositions.topL}if(this.deleteTooltip){this.deleteTooltip=gx.getMessage(this.deleteTooltip)}else{this.deleteTooltip=""}if(this.deleteTitle){this.deleteTitle=gx.getMessage(this.deleteTitle)
}else{this.deleteTitle=""}},_deinit:function(){this.lastFocusCtrl=null}};