Class Reference
%ZEN.Component.dynaGrid
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [BASEXML] >  [%ZEN] >  [Component] >  [dynaGrid]
Private  Storage

class %ZEN.Component.dynaGrid extends control, dataView

An editable grid control.
The data and size of the grid is provided by the %ZEN.Auxiliary.dataSet associated with the grid.
The first dimension of the dataSet supplies rows, the second supplies columns. The third dimension, if present, supplies "pages" for the grid. (One page is visible at a time).

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
6 43 59


Summary

Properties
%condition %controller %import %includeFiles
%page %resource OnCreateDataSet align
aux borders cells clientType
columnHeaderStyle columnWidth columns composite
containerStyle controlClass controlStyle controller
controllerId currColumn currPage currRow
dataBinding dataSet disabled dragEnabled
dropEnabled editLabels enclosingClass enclosingStyle
error format gridClass gridLabel
height hidden hint hintClass
hintStyle id index invalid
invalidMessage label labelClass labelDisabledClass
labelStyle multiSelect name nowrap
onafterdrag onarrowclick onbeforedrag onblur
onchange onchangecell onchangepage onclick
onclickcolumn onclicklabel onclickrow ondblclick
ondrag ondrawcell ondrop oneditcell
oneditkeydown oneditkeyup onfocus ongetcellvalue
onhide onkeydown onkeypress onkeyup
onmousedown onmouseout onmouseover onmouseup
onnotifyView onrefresh onrender onselectcell
onshow onsubmit onupdate onvalidate
originalValue parent readOnly required
requiredMessage rowHeaderStyle rowLabelWidth rows
scrollIntoView selectedCellBackground selectedCellColor selectedRange
selectedRangeBackground showArrows showColumnLabels showLabel
showRowLabels showZebra slice style
tabIndex title tuple valign
value visible width window

Methods
%%OIDGet %AddToSaveSet %ApplyDefaultLabels %Attr
%BindExport %ClassIsLatestVersion %ClassName %ConstructClone
%CreateDataSet %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
%DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%DrawComponentHTML %DrawHTML %DrawJSStrings %EnclosingDivId
%Eval %Extends %ForceClientRender %GetEventHandlers
%GetForm %GetParameter %GetXMLName %IsA
%IsModified %MakeId %Name %New
%NormalizeObject %ObjectModified %OnAddToPageAfter %OnAddToPageBefore
%OnDrawEnclosingDiv %OnDrawObjectProperties %OnObjectSynch %OnZENDeserialize
%OriginalNamespace %PackageName %QuoteValue %QuoteValueL10N
%RemoveFromSaveSet %Self %SerializeObject %SetDefaultValues
%SetModified %ValidateObject XMLDTD XMLExport
XMLExportToStream XMLExportToString XMLNew XMLSchema
XMLSchemaNamespace XMLSchemaType adjustSizes cellClickHandler
cellDblClickHandler cellEditKeyHandler cellEditKeyUpHandler columnLabelDblClickHandler
columnLabelHandler dragFinishHandler dragHandler dragNotifyHandler
dragStartHandler dropHandler dropStartHandler editCell
exposeComponent findElement fireOnUpdateEvent focus
formatValue getCSSWidthSpec getCellContents getCellEditor
getCellInfo getCellProperty getCellValue getColumnCount
getColumnInfo getColumnProperty getController getCurrColumn
getCurrRow getDataSet getDisabled getDragData
getEdgeWidth getEditCellHTML getEnclosingDiv getForm
getHidden getHintElement getInvalidReason getLabelElement
getPageCount getProperty getReadOnly getRowCount
getRowInfo getRowProperty getSelectedRange getSettings
getType getValue gridKeyBlur gridKeyDownHandler
gridKeyFocus gridKeyPressHandler gridLabelHandler invokeSuper
isCellEditable isCellVisible isModified isOfType
isValid makeId moveToCell nextPage
normalizeValue notifyViewHandler onCreate onDelete
onDisplayHandler onEndModalHandler onPopupAction onRefreshContents
onSerialize onStartModalHandler onchangeHandler onloadHandler
onunloadHandler onupdateHandler previousPage refreshContents
render renderContents renderSVG rowLabelDblClickHandler
rowLabelHandler select selectCell selectCellHandler
selectCellRange sendEventToController setCellProperty setCellValue
setColumnProperty setControllerId setDisabled setHidden
setLabelValue setOverlayMode setProperty setReadOnly
setRowProperty setValue startProgressBar stopEditCell
stopProgressBar sysName unformatValue validationHandler

Subclasses
%ZEN.Component.objectInspector

Parameters

• parameter DEFAULTCOLUMNWIDTH = 100;
Default value for the columnWidth property in pixels.
• parameter DEFAULTGRIDCLASS = "dynaGrid";
Subclasses can set this to change default css class used for grids.
• parameter DEFAULTGRIDLABEL;
Default value for the gridLabel property.
• parameter DEFAULTROWLABELWIDTH = 100;
Default value for the rowLabelWidth property in pixels.
• parameter DEFAULTSHOWARROWS = 0;
Default value for the showArrows property.
• parameter SYSMODULE;
Do not include in "form" module.

Properties

• property OnCreateDataSet as %ZEN.Datatype.delegator(FORMALSPEC="pGrid:%ZEN.Component.dynaGrid,pDataSet:%ZEN.Auxiliary.dataSet",RETURNTYPE="%Status");
Name of Server-side callback method to call to information for each node of this tree.
This must be the name of a server-only method in the page class that contains this component.
• property borders as %ZEN.Datatype.string(VALUELIST=",all,none") [ InitialExpression = "all" ];
Specify whether cell borders should be "all" (the default) or "none".
• property cells as list of %ZEN.Auxiliary.gridCell(XMLPROJECTION="ELEMENT",XMLREF=1,XMLTYPECONSTRAINT="CHOICE",ZENSETTING=0);
Additional specification for cells within the grid. This allows cell-by-cell overrides of formats and styles.
• property columnHeaderStyle as %ZEN.Datatype.style;
Additional style to apply to column headers in this grid.
• property columnWidth as %ZEN.Datatype.length [ InitialExpression = ..#DEFAULTCOLUMNWIDTH ];
This is the default width (in pixels) used for columns that do not supply a width.
• property columns as list of %ZEN.Auxiliary.gridColumn(XMLPROJECTION="ELEMENT",XMLREF=1,XMLTYPECONSTRAINT="CHOICE",ZENSETTING=0);
Additional specification for columns within the grid.
• property currColumn as %ZEN.Datatype.integer [ InitialExpression = 1 ];
This is the column number (1-based) of the current selected cell.
• property currPage as %ZEN.Datatype.integer [ InitialExpression = 1 ];
In case of 3-dimensional dataSet, this is the current "page" (third dimension) being displayed. (1-based).
• property currRow as %ZEN.Datatype.integer [ InitialExpression = 1 ];
This is the row number (1-based) of the current selected cell.
• property dataSet as %ZEN.Auxiliary.dataSet(ZENSETTING=0);
Data displayed by this grid control.
• property editLabels as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, the user can double-click on row and column labels and edit their value.
• property format as %ZEN.Datatype.string;
Default format to apply to cells in this grid.
This is a DeepSee format string: e.g., "###.##" This is overridden by row and column-level formatting.
• property gridClass as %ZEN.Datatype.cssClass [ InitialExpression = ..#DEFAULTGRIDCLASS ];
Optional CSS class for the table containing the grid.
• property gridLabel as %ZEN.Datatype.caption [ InitialExpression = ..#DEFAULTGRIDLABEL ];
Caption to display in upper, left label cell.
• property multiSelect as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, users can select a range of cells in the grid.
• property nowrap as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
If true (the default), then the contents of cells within the grid will not word wrap (by setting the nowrap attribute for the cell's td element).
• property onarrowclick as %ZEN.Datatype.eventHandler;
onarrowclick event handler: If defined, this event is fired when the user clicks on a row or column arrow. The variable which will indicate which arrow is clicked.
• property onchangecell as %ZEN.Datatype.eventHandler;
onchangecell event handler: If defined, this event is fired when the user changes the value of a cell.
• property onchangepage as %ZEN.Datatype.eventHandler;
onchangepage event handler: If defined, this event is fired when the user clicks on the next or previous page buttons for a 3D grid. If this callback returns false, the page change will not happen.
• property onclickcolumn as %ZEN.Datatype.eventHandler;
onclickcolumn event handler: If defined, this event is fired when the user clicks on a column label.
• property onclicklabel as %ZEN.Datatype.eventHandler;
onclicklabel event handler: If defined, this event is fired when the user clicks on grid label cell in the upper left.
• property onclickrow as %ZEN.Datatype.eventHandler;
onclickrow event handler: If defined, this event is fired when the user clicks on a row label.
• property ondblclick as %ZEN.Datatype.eventHandler;
ondblclick event handler: This event is fired when the mouse is double-clicked on the control.
• property ondrawcell as %ZEN.Datatype.eventHandler;
ondrawcell event handler: If defined, this event is fired when a cell is about to be drawn. If this event handler returns a value, then it is used as DHTML to render the cell contents.
• property oneditcell as %ZEN.Datatype.eventHandler;
oneditcell event handler: If defined, this event is fired when a cell is about to be edited. If this event handler returns a value, then it is used as DHTML to render the cell editor.
• property oneditkeydown as %ZEN.Datatype.eventHandler;
onkeydown event handler for default cell edit control.
• property oneditkeyup as %ZEN.Datatype.eventHandler;
onkeyup event handler for default cell edit control.
• property ongetcellvalue as %ZEN.Datatype.eventHandler;
ongetcellvalue event handler: If defined, this event is fired to get the value to display in the current cell.
The current cell row and column number is updated before this call is made.
The event handler is passed 3 variables, row and col, which contain the row and column number of the current cell (1-based); and data, which is the value for the cell provided by the grid's data set.
If not defined or if this event return handler returns null, then the value from the grid's data set is used.
This callback is also invoked when the value of a cell is directly set by the setCellValue method.
This is different than the ondrawcell event, which returns the actual HTML to display within a cell.
• property onrender as %ZEN.Datatype.eventHandler;
onrender event handler: If defined, this event is fired just before the grid is rendered.
• property onselectcell as %ZEN.Datatype.eventHandler;
onselectcell event handler: If defined, this event is fired when the user navigates to a new cell.
The current cell row and column number is updated before this call is made.
The event handler is passed 2 variables, row and col, which contain the row and column number of the current cell (1-based).
• property rowHeaderStyle as %ZEN.Datatype.style;
Additional style to apply to row headers in this grid.
• property rowLabelWidth as %ZEN.Datatype.length [ InitialExpression = ..#DEFAULTROWLABELWIDTH ];
Width used for row labels. This may be specified as either a fixed width in pixels or as a percentage of the total space allocated for the component.
• property rows as list of %ZEN.Auxiliary.gridRow(XMLPROJECTION="ELEMENT",XMLREF=1,XMLTYPECONSTRAINT="CHOICE",ZENSETTING=0);
Additional specification for rows within the grid.
• property scrollIntoView as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
If true, use the zenScrollIntoView function to try and make the current cell visible.
• property selectedCellBackground as %ZEN.Datatype.style [ InitialExpression = "rgb(47,98,128)" ];
Background color applied to the selected cell.
• property selectedCellColor as %ZEN.Datatype.style [ InitialExpression = "white" ];
Color applied to the selected cell range.
• property selectedRange as %ZEN.Datatype.csv;
This specifies the current selected range of cells as a comma-separated list of integers. The list is of the form:
startRow,startCol,endRow,endCol
All cells numbers are 1-based.
If the range is equal to "", then no cells are selected.
This is only used if multiSelect is true.
• property selectedRangeBackground as %ZEN.Datatype.style [ InitialExpression = "rgb(87,138,168)" ];
Background color applied to the selected cell range.
• property showArrows as %ZEN.Datatype.boolean [ InitialExpression = ..#DEFAULTSHOWARROWS ];
Specifies whether the add rows and columns arrows should be displayed.
• property showColumnLabels as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
Specifies whether column labels should be displayed.
• property showRowLabels as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
Specifies whether row labels should be displayed.
• property showZebra as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Specify whether zebra striping should be applied to the grid.
• property style as %ZEN.Datatype.style;
Additional style to apply to cells in this grid.
This is applied before any row and column-level styles.

Methods

• method %ApplyDefaultLabels()
Applies the row and column labels defined by the rows and columns collections.
• method %CreateDataSet() as %Status
This callback provides a way to fill in the dataSet object used to provide values for this grid.
• method %OnAddToPageAfter() as %Status
If implemented, this callback method is called at page render-time when this component is added to a page.
• method %SetDefaultValues()
This method fills in reasonable default values for this control. Used by tools (such as Control Tester) to dynamically create controls.
• method adjustSizes() [ Language = javascript ]
Adjust the column sizes of this grid.
• method cellClickHandler(row, col, evt) [ Language = javascript ]
User has clicked on a cell.
• method cellDblClickHandler(row, col, evt) [ Language = javascript ]
User has dbl-clicked on a cell.
• method cellEditKeyHandler(evt) [ Language = javascript ]
Process keys pressed within the grid's cell edit control.
• method cellEditKeyUpHandler(evt) [ Language = javascript ]
Process key up event within the grid's cell edit control.
• method columnLabelDblClickHandler(col) [ Language = javascript ]
User has double-clicked on a column label.
• method columnLabelHandler(col) [ Language = javascript ]
User has clicked on a column label.
• method editCell(defval, which) [ Language = javascript ]
Display edit control in the current cell. If defval is defined, then use it as the initial value in the editor. which indicates what type of cell is being edited: "row" (row label), "column" (column label), otherwise a data cell.
• method focus() [ Language = javascript ]
Client-side method to input focus to this control.
• method getCSSWidthSpec(node) [ Language = javascript ]
Get the defined width of a node as specified in the CSS
• method getCellContents(data, r, c) [ Language = javascript ]
Prepares data for display within a given cell. If there is an ondrawcell callback, it is invoked. This callback has a chance to chance the contents that will be displayed within the cell.
• method getCellEditor() [ Language = javascript ]
Return the html element for the current cell editor, if there is one.
• method getCellInfo(page, row, col) [ Language = javascript ]
Return the cell descriptor for the given cell (if any). (0-based).
• method getCellProperty(pageno, rowno, colno, property) [ Language = javascript ]
Get the value of a property for a cell descriptor of this grid. pageno, rowno, and colno are 1-based.
• method getCellValue(r, c) [ Language = javascript ]
Return value of grid cell; Row and column are 1-based.
• method getColumnCount() [ Language = javascript ]
Return number of columns in this grid.
• method getColumnInfo(c) [ Language = javascript ]
Return an object containing display information for column c (0-based).
• method getColumnProperty(colno, property) [ Language = javascript ]
Get the value of a property for a column descriptor of this grid.
• method getCurrColumn() [ Language = javascript ]
Return column number (1-based) of the most recently selected column.
• method getCurrRow() [ Language = javascript ]
Return row number (1-based) of the most recently selected row.
• method getDataSet() [ Language = javascript ]
Return the dataSet object associated with this grid.
• method getEdgeWidth(node, margins, borders, padding) [ Language = javascript ]
Calculate the pixels needed to render the edge of a given cell, including (potentially) the space needed for the margins, borders and padding
• method getEditCellHTML(r, c, value, which) [ Language = javascript ]
Return the HTML that renders the cell editor for the given cell. r and c are 1-based. If r is 0, then we are editing a column header; If c is 0, then we are editing a row header; which indicates what is being edited (see editCell).
• method getPageCount() [ Language = javascript ]
Return number of "pages" in this grid.
• method getRowCount() [ Language = javascript ]
Return number of rows in this grid.
• method getRowInfo(r) [ Language = javascript ]
Return an object containing display information for row r (0-based).
• method getRowProperty(rowno, property) [ Language = javascript ]
Get the value of a property for a row descriptor of this grid.
• method getSelectedRange() [ Language = javascript ]
Return the range of selected cells or null if nothing selected. The range is returned as an array of startRow,startCol,endRow,endCol.
• method gridKeyBlur() [ Language = javascript ]
Focus taken from the grid's invisible edit control.
• method gridKeyDownHandler(evt) [ Language = javascript ]
Process keydown event within the grid's invisible edit control.
• method gridKeyFocus() [ Language = javascript ]
Focus passed to the grid's invisible edit control.
• method gridKeyPressHandler(evt) [ Language = javascript ]
Process keypress event within the grid's invisible edit control.
• method gridLabelHandler() [ Language = javascript ]
User has clicked on the grid label.
• method isCellEditable(r, c) [ Language = javascript ]
Return whether a given cell can be edited; Row and column are 1-based.
• method isCellVisible(r, c) [ Language = javascript ]
Return whether a given cell is visible; Row and column are 1-based.
• method moveToCell(dir) [ Language = javascript ]
Move to a new, editable, cell. dir is "up","down","left","right" Returns true if move was successful.
• method nextPage() [ Language = javascript ]
For 3-D grid, move to the next page of the grid.
• method notifyViewHandler(reason, data1, data2, data3) [ Language = javascript ]
Notification that the dataController associated with this dataView has raised an event.
• method onCreate() [ Language = javascript ]
Initialize additional client-side values
• method previousPage() [ Language = javascript ]
For 3-D grid, move to the previous page of the grid.
• method renderContents() [ Language = javascript ]
Client-side method to render this component.
• method rowLabelDblClickHandler(row) [ Language = javascript ]
User has double-clicked on a row label.
• method rowLabelHandler(row) [ Language = javascript ]
User has clicked on a row label.
• method selectCell(r, c, notify) [ Language = javascript ]
Make the specified cell the current cell.
r and c are 0-based.
If notify is true, then raise an onSelectCell event.
• method selectCellHandler(r, c) [ Language = javascript ]
Notification that user is about to move to a new cell.
• method selectCellRange(startRow, startCol, endRow, endCol) [ Language = javascript ]
Set the selected cell range. Addresses are 1-based.
• method setCellProperty(pageno, rowno, colno, property, value) [ Language = javascript ]
Set the value of a property for a cell descriptor of this grid. pageno, rowno, and colno are 1-based.
• method setCellValue(value, r, c) [ Language = javascript ]
Set the value of grid cell; Row and column are 1-based.
• method setColumnProperty(colno, property, value) [ Language = javascript ]
Set the value of a property for a column descriptor of this grid.
• method setLabelValue(value, which, index) [ Language = javascript ]
Set the value of grid label; index is 1-based. which is "row" or "column".
• method setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.
• method setRowProperty(rowno, property, value) [ Language = javascript ]
Set the value of a property for a row descriptor of this grid.
• method stopEditCell(cancel) [ Language = javascript ]
Stop editing of the current cell.
If cancel is true, then do not save current control value.