Name
basegrid — An abstract row-based container for data elements.
Description
basegrid
is an abstract container for
row-based data stored in a dataset. Because
basegrid
uses lazy replication, it is an efficient way to
present large datasets, and it abstracts some of the complications
involved in maintaining a selection within a dataset.
An abstract container for data rows, relying on lazy replication
to make it possible to display large datasets.
Known Subclasses
Known Direct Subclasses: grid
Details
Properties (15)
-
bgcolor0
-
<attribute name="bgcolor0" type="color" value="$immediately{null}" />
public var bgcolor0 : color;
If given, sets the bgcolor for even numbered rows. If not given,
the bgcolor for these rows is taken from the style's bgcolor.
-
bgcolor1
-
<attribute name="bgcolor1" type="color" value="$immediately{null}" />
public var bgcolor1 : color;
If given, sets the bgcolor for odd numbered rows. If not given,
the bgcolor for these rows is taken from the style's bgcolor.
-
_columnclass
-
<attribute name="_columnclass" value="basegridcolumn" />
protected var _columnclass;
The class to use to construct columns, if the
columns are inferred by the basegrid.
-
columns
-
<attribute name="columns" value="null" />
An array holding the basegridcolumns used by this grid
-
contentdatapath
-
<attribute name="contentdatapath" type="string" value="*" />
public var contentdatapath : String;
The datapath to use for the contents of the grid. By
default, this is set to "*", meaning all of the nodes underneath
the datacontext of the grid.
-
hilite
-
<attribute name="hilite" value="null" />
The view which is currently hilited.
-
multiselect
-
<attribute name="multiselect" value="true" />
If true, the list will allow for multiple selection, and the
getSelection method will always return a list. If false, only
single selection is allowed.
-
_rowclass
-
<attribute name="_rowclass" value="basegridrow" />
The class to use to construct rows.
-
rowheight
-
<attribute name="rowheight" type="number" value="null" />
public var rowheight : Number;
Optional height for the rows contained by the grid. If no
value is given for this attribute, it will be set to the
calculated height of rows.
-
selectable
-
<attribute name="selectable" value="true" />
If false, the rows are not clickable and the grid does not support selection.
-
showhlines
-
<attribute name="showhlines" type="boolean" value="false" />
public var showhlines : Boolean;
If true, lines will be drawn (in component's style's bordercolor)
vertically at each at each column division. This attribute can be
set after instantiation.
-
shownitems
-
<attribute name="shownitems" value="-1" />
Sets the height of the grid to show a maximum of 'n' items.
-
showvlines
-
<attribute name="showvlines" type="boolean" value="false" />
public var showvlines : Boolean;
If true, lines will be drawn (in component's style's bordercolor)
horizontally at each at each row division. This attribute cannot
be set after instantiation.
-
sizetoheader
-
<attribute name="sizetoheader" type="expression" value="null" />
public var sizetoheader : Object;
A boolean. If true, the grid will keep its width set to the size
of the header. This is automatically set to true for grids that
do not have a set width. This is initially set to 0, which means
that it is not true, but if it is explicitly set to false, the
automatic behavior will be disabled for grids with no set
width.
-
spacing
-
<attribute name="spacing" type="number" value="0" />
public var spacing : Number;
Spacing between the rows.
Methods (13)
-
clearSelection()
-
<method name="clearSelection" />
public function clearSelection();
Clear the current selection.
-
clearSort()
-
<method name="clearSort" />
public function clearSort();
Removes the current sort if one is set, and restores the
original order of the dataset.
-
getIndexForItem()
-
<method name="getIndexForItem" args="item" />
public function getIndexForItem(item : basegridrow);
Get the index for an item.
-
getItem()
-
<method name="getItem" args="data" />
public function getItem(data : LzDatanode);
Find a particular item by its data node.
-
getItemAt()
-
<method name="getItemAt" args="index" />
public function getItemAt(index : Number) : basegridrow;
Get a particular item by its index.
-
getNumItems()
-
<method name="getNumItems" />
public function getNumItems() : Number;
Get the number of items in the list.
-
getSelection()
-
<method name="getSelection" />
public function getSelection() : Object;
Get the selection for the list.
-
removeItemAt()
-
<method name="removeItemAt" args="index" />
public function removeItemAt(index : Number);
Find the item at the specified index and remove it from the list.
-
select()
-
<method name="select" args="item" />
public function select(item : basegridrow);
-
selectItem()
-
<method name="selectItem" args="data" />
public function selectItem(data : LzDatanode);
Select an item by its datanode.
-
selectItemAt()
-
<method name="selectItemAt" args="index" />
public function selectItemAt(index : Number);
-
selectNext()
-
<method name="selectNext" />
public function selectNext();
Move the selection to the next view.
-
selectPrev()
-
<method name="selectPrev" />
public function selectPrev();
Move the selection to the previous view.
Events (1)
-
onselect
-
<attribute name="onselect" />
Event sent when the grid selection changes.
LZX Synopsis
<class name="
basegrid" extends="
basecomponent
">
<attribute name="
bgcolor0
" type="
color" value="
$immediately{null}" />
<attribute name="
bgcolor1
" type="
color" value="
$immediately{null}" />
<attribute name="
columns
" value="
null" />
<attribute name="
hilite
" value="
null" />
<attribute name="
_rowclass
" value="
basegridrow" />
<attribute name="
rowheight
" type="
number" value="
null" />
<attribute name="
showhlines
" type="
boolean" value="
false" />
<attribute name="
showvlines
" type="
boolean" value="
false" />
<attribute name="
sizetoheader
" type="
expression" value="
null" />
<attribute name="
spacing
" type="
number" value="
0" />
<method name="
getItem
" args="
data" />
<method name="
select
" args="
item" />
</class>
JavaScript Synopsis
public
basegrid extends
basecomponent
{
prototype public function
getItem
(
data : LzDatanode);
prototype public function
getItemAt
(
index : Number) :
basegridrow;
prototype public function
select
(
item : basegridrow);
prototype public function
selectItem
(
data : LzDatanode);
}