Field Summary |
public
| __showHeaders: Boolean |
|
|
|
public
| autoSync: Boolean |
| do we auto sync the underlying source when there is a selection
|
|
public static
| classInfo: Object |
| A static class information object
|
|
public
| columnAutoWidth: Boolean |
| A Boolean value that indicates whether the columns widths are adjusted proportionatley to the DataGrid width.
|
|
public
| indicatorWidth: Number |
| Width of indicator column
|
|
public
| rowStyle: Object |
| The list row styles
|
|
public
| styleClass: String |
| The name of the style class this instance will use.
|
|
public
| vGridLines: Boolean |
| controls whether vertical gridlines are displayed*
|
|
|
| Fields inherited from class xp.controls.ScrollSelectView__alternateColor, __backgroundColor, __hGridLineColor, __highlightColor, __selectColor, __selectedValueFormatter, __selectedValuePath, __vGridLineColor, autoSync, body, canEdit, canInsert, classInfo, editable, editorType, editRow, footer, header, hGridLines, hLargeScroll, hscrollbar, hScrollPolicy, hSmallScroll, isSelectionRequired, scrollMode, statusbar, tabStop, textHighlightColor, textSelectColor, titlebar, topIndex, useRollOver, vGridLines, vLargeScroll, vscrollbar, vScrollPolicy, vSmallScroll |
|
| Fields inherited from class xp.system.UIControl__layout, allowDrop, autoLayout, bindingDefaultValue, bindingFormatter, bindingPath, bindingSource, bindingType, bindingValidator, border, causesValidation, classInfo, clickOnENTER, clickOnSPACE, container, context, data, disableAcceptButton, disableCancelButton, enableBGMouseEvents, enableDblClickEvent, enableKeyDownEvents, enableKeyEvents, enableKeyUpEvents, enableMouseWheelEvents, formatterOptions, horizontalAlignment, index, isBinding, itemId, logEnabled, parent, parentContainer, parentForm, percentageHeight, percentageWidth, styleClass, tabIndex, tabStop, tooltip, tree, verticalAlignment |
|
Property Summary |
public
| columnCount: Number (read-only)
|
| The number of columns that are displayed.
|
|
public
| columnNames: Array (read, write) |
| An array of field names within each item that are displayed as columns.
|
|
public
| columns (read, write) |
| Sets or gets the DataGrids primary or master columns
|
|
public
| dataProvider: Object (read, write) |
| Gets or set the list items
|
|
public
| footerHeight: Number (read, write) |
| The height of the footer RowGroup.
|
|
public
| headerHeight: Number (read, write) |
| The height of the header RowGroup
|
|
public
| headerRowHeight: Number (read, write) |
| the height of standard header rows-only used by addDefaultHeaders
|
|
public
| resizableColumns: Boolean (read, write) |
| A Boolean value that indicates whether the columns are resizable (true) or not (false).
|
|
public
| rowCount: Number (read-only)
|
| Number of rows actually visible in the itemsControl
|
|
public
| showHeaders: Boolean (read, write) |
| A Boolean value that indicates whether the data grid displays the column headers (true) or not (false).
|
|
public
| sortableColumns: Boolean (read, write) |
| A Boolean value that indicates whether the columns are sortable (true) or not (false).
|
|
public
| statusbarHeight: Number (read, write) |
| The height of the statusbar.
|
|
public
| statusbarMessage: String (read, write) |
| Gets/Sets the display message in the statusbar
|
|
public
| titlebarHeight: Number (read, write) |
| The height of the titlebar
|
|
public
| titlebarMessage: String (read, write) |
| Gets/Sets the display message in the titlebar
|
|
public
| viewportPixelHeight: 0 (read-only)
|
| The height of the viewable window--override to allow for header footer
|
|
public
| viewportTop: 0 (read-only)
|
| The location of the top of the viewport
|
|
|
| Properties inherited from class xp.controls.ScrollSelectViewalternateColor, backgroundColor, contentHeight, contentPixelHeight, contentWidth, hGridLineColor, highlightColor, hPosition, rowAutosize, rowHeight, rowWidth, sbHHeight, sbVWidth, selectColor, selectedIndex, selectedIndices, selectedItem, selectedItems, selectedValue, selectedValueFormatter, selectedValuePath, selectionMode, variableRowHeight, vGridLineColor, viewportHeight, viewportLeft, viewportPixelHeight, viewportTop, viewportWidth, virtualMode, vPosition |
|
| Properties inherited from class xp.system.UIControlalpha, autosize, background, backgroundVisible, bindings, borderBrush, borderRadius, borderShadow, borderStyle, borderThickness, bottom, dataSource, enableMouseEvents, focusManager, height, id, isEnabled, isFocused, isMouseOver, isPressed, isSelected, isValid, layout, left, margin, maxHeight, maxWidth, measuredHeight, measuredMinHeight, measuredMinWidth, measuredWidth, minHeight, minWidth, padding, readOnly, resources, right, styleName, top, triggers, visible, width, x, y |
|
Constructor |
public
| DataGrid (
)
|
| Constructor - This should not be called directly.
|
|
Method Summary |
public
| addColumn (
colName: Object, colTitle: String, colWidth: String
): Column |
| Adds a columns to this DataGrid
|
|
public
| addColumnAt (
index: Number, colName: Object, colTitle: String, colWidth: String
): Column |
| Adds a columns to this DataGrid
|
|
public
| addColumns (
cols: Array
): Void |
| Adds a set of columns to this DataGrid columns set.
|
|
public static
| calculateWidths (
columns: Array, width: Number
): Array |
| Converts preferred widths into actual pixels
|
|
public
| generateItemUI (
): Object |
| Generates an item UI for this items control
|
|
public
| getClass (
): Function |
| Returns a reference to the components static class
|
|
public
| getColumn (
name: String
): Column |
| Gets a reference to the Column object with the specified name.
|
|
public
| getColumnAt (
index: Number
): Column |
| Gets a reference to the Column object at the specified index.
|
|
public
| getColumnIndex (
columnName: String
): Column |
| Returns the index of the column specified by the columnName parameter.
|
|
public
| hideEditor (
save: Boolean
): Boolean |
| Hides the cell editor, called on a cellPress
|
|
public static
| newInstance (
owner, instanceId, depth, initObj
) |
| Creates a new Instance of this class
|
|
public
| onSetFocus (
oldFocus: Object
): Void |
| SetFocus handler.Called when you get focus. If focus is actualy set to some internal TextField that TextField must call onSetFocus when it gets focus.
|
|
public
| removeAllColumns (
): Void |
| Removes all Columns from the target DataGrid instance.
|
|
public
| removeColumnAt (
index: Number
): Column |
| Removes the Column instance at the given index.
|
|
public
| resetColumns (
): Void |
| Clears all data rows, then reinitialises the columns and reloads the data
|
|
public
| resizeColumn (
index: Number, inc: Number
): Void |
| Resizes a column
|
|
public
| scrollInView (
itemIndex: Number, columnIndex: Number
) |
| Scrolls the ItemsControl so the specified row and cell are in view
|
|
public
| selectRowForEditing (
itemIndex: Number
): Void |
| Callback handler called when the editor has finished editing the current row
|
|
public
| setScrollContentHPos (
pos
): Void |
| Sets the horizontal scroll position
|
|
public
| showEditor (
itemIndex: Number, columnIndex: Number
): Boolean |
| Shows the cell editor row
|
|
public
| sortRows (
columnIndex: Number
): Void |
| Sort the rows of the DataGrid
|
|
public
| updateVirtualRows (
start: Number, end: Number
): Void |
| Update the data for the visible rows in the list
|
|
|
| Methods inherited from class xp.controls.ScrollSelectViewclearSelected, drawComponent, getClass, getItemAt, getItemIndex, getItemValue, getValueIndex, isSelected, setScrollContentVPos, setSelectedIndices, setSelectedItems |
|
| Methods inherited from class xp.system.UIControladdBinding, addBindings, addEventListener, addPropertyTrigger, applyStyle, beginDeferUpdate, canUpdate, centerContent, checkState, containsFocus, destroy, destroyObject, drawFocus, endDeferUpdate, findFocusFromObject, findFocusInChildren, getBinding, getBounds, getCenter, getClass, getFocus, getFocusManager, getFocusRect, getLocation, getPropertyValue, getSize, getStateName, getTrigger, globalToLocalPoint, invalidate, invalidateLayout, invalidateSize, invalidateSizeAndLayout, invalidChild, isChild, isMouseDirectlyOver, isParent, localToGlobalPoint, localToLocalPoint, measure, mouseWheel, move, onChildFocus, onKillFocus, onSetFocus, processEnterKey, processEscapeKey, processTabKey, redraw, refresh, removeEventListener, routeEvent, setBounds, setFocus, setLocation, setPropertyValue, setSize, setValueChanged, update, validate |
|
|
The DataGrid receives focus when you click it or tab to it, and you can then use the following keys to control it:
You can then use the following keys to control it whilst editing:
Event summary for the DataGrid class
The following table lists events of the DataGrid class.