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.
<canvas
height
="150
">
<dataset
name
="contacts
" request
="true
" src
="http:resources/contactsdata.xml
"/>
<basegrid
datapath
="contacts:/resultset
" width
="200
" height
="150
">
<basegridcolumn
>
<text
placement
="header
">Check 'em off
</text
>
<checkbox
text
="$path{ '@displayname'}
" value
="$path{'@checked'}
">
<handler
name
="onvalue
">
this.parent.parent.datapath.updateData();
</handler
>
</checkbox
>
</basegridcolumn
>
<scrollbar
placement
="content
"/>
</basegrid
>
</canvas
>
Name (CSS property) | Type (tag) | Type (js) | Default | Category |
---|---|---|---|---|
bgcolor0
|
color | Color | null | read/write |
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
|
color | Color | null | read/write |
If given, sets the bgcolor for odd numbered rows. If not given, the bgcolor for these rows is taken from the style's bgcolor. | ||||
columns
|
expression | any | null | read/write |
An array holding the basegridcolumns used by this grid | ||||
contentdatapath
|
string | String | * | read/write |
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
|
expression | any | null | read/write |
The view which is currently hilited. | ||||
multiselect
|
expression | any | true | read/write |
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. | ||||
rowheight
|
number | Number | null | read/write |
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
|
expression | any | true | read/write |
If false, the rows are not clickable and the grid does not support selection. | ||||
showhlines
|
boolean | boolean | false | read/write |
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
|
expression | any | -1 | read/write |
Sets the height of the grid to show a maximum of 'n' items. | ||||
showvlines
|
boolean | boolean | false | read/write |
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
|
expression | any | null | read/write |
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
|
number | Number | 0 | read/write |
Spacing between the rows. |
doesenter, enabled, hasdefault, isdefault, style, styleable, text
aaactive, aadescription, aaname, aasilent, aatabindex, align, backgroundrepeat, bgcolor, cachebitmap, capabilities, clickable, clickregion, clip, colortransform, context, contextmenu, cornerradius, cursor, fgcolor, focusable, focustrap, font, fontsize, fontstyle, frame, framesloadratio, hasdirectionallayout, hassetheight, hassetwidth, height, layout, loadratio, mask, opacity, pixellock, playing, proxyurl, resource, resourceheight, resourcewidth, rotation, shadowangle, shadowblurradius, shadowcolor, shadowdistance, showhandcursor, source, stretches, subviews, tintcolor, totalframes, unstretchedheight, unstretchedwidth, usegetbounds, valign, visibility, visible, width, x, xoffset, xscale, y, yoffset, yscale
classroot, cloneManager, data, datapath, defaultplacement, id, ignoreplacement, immediateparent, inited, initstage, name, nodeLevel, options, parent, placement, styleclass, subnodes, transition
Methods
clearSelection() |
---|
clearSort() |
---|
getIndexForItem() |
---|
getItem() |
---|
getItemAt() |
---|
getNumItems() |
---|
getSelection() |
---|
Returns | Type | Description |
---|---|---|
Object |
null if no selection, an
LzDatapointer if single select, or
an array of LzDatapointer s if multiselect (default).
|
removeItemAt() |
---|
select() |
---|
Parameter Name | Type | Description |
---|---|---|
item | basegridrow | the basegridrow to select (may be an array when multiselect == true) |
selectItem() |
---|
selectItemAt() |
---|
selectNext() |
---|
selectPrev() |
---|
setContentdatapath() |
---|
acceptValue, doEnterDown, doEnterUp, doSpaceDown, doSpaceUp, presentValue, setStyle, setTint, updateDefault
bringToFront, containsPt, getAttributeRelative, getBounds, getColor, getColorTransform, getCurrentTime, getDepthList, getDisplayObject, getID3, getMouse, getNextSelection, getPan, getPrevSelection, getProxyURL, getTotalTime, getVolume, init, isBehind, isInFrontOf, isMouseOver, measureHeight, measureWidth, play, proxyurl, searchSubviews, seek, sendAAEvent, sendBehind, sendInFrontOf, sendToBack, setAccessible, setAttributeRelative, setColor, setColorTransform, setPan, setProxyPolicy, setSource, setVolume, shouldYieldFocus, stop, unload, updateResourceSize
animate, applyConstraintMethod, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getOption, getUID, init, lookupSourceLocator, releaseConstraint, releaseConstraintMethod, searchImmediateSubnodes, searchSubnodes, setOption, setSelected, updateData
onaddsubview, onbackgroundrepeat, onblur, onclick, onclickable, onclip, oncontext, oncornerradius, ondblclick, onerror, onfocus, onframe, onframesloadratio, ongesture, onheight, onkeydown, onkeyup, onlastframe, onload, onloadratio, onmousedown, onmousedragin, onmousedragout, onmouseout, onmouseover, onmousetrackout, onmousetrackover, onmousetrackup, onmouseup, onmouseupoutside, onopacity, onplay, onplaying, onremovesubview, onshadowangle, onshadowblurradius, onshadowcolor, onshadowdistance, onstop, ontimeout, ontouch, onvisible, onwidth, onx, ony
Copyright © 2002-2010 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.