Name

gridcolumn — Declares a column in a grid.

Synopsis

LZX: gridcolumn
JavaScript: lz.gridcolumn
Type: Class
Access: public
Topic: Components.Laszlo Components
Declared in: lps/components/lz/gridcolumn.lzx

Description

The gridcolumn class can be used to declare a column in a grid with the standard column header look without specifying exactly what goes inside the column. This can be useful for embedding other components within a grid.

<canvas height="160">
              <dataset name="contacts" request="true" src="http://www.openlaszlo.org/lps/demos/contacts/contactsdata.xml"/>

              <grid datapath="contacts:/resultset">
              <gridcolumn showheader="false" width="50">
              <view bgcolor="#CCCCCC" width="${parent.width}" placement="header" height="${parent.immediateparent.height-1}"/>
              <text datapath="position()"/>
              </gridcolumn>
              <gridcolumn width="200"> Name
              <text datapath="@displayname"/>
              </gridcolumn>
              <gridcolumn sortable="false"> Home
              <checkbox value="$path{'@home_default'}" xoffset="${10-parent.width/2}">
              <handler name="onvalue">
              this.datapath.updateData();
              </handler>
              </checkbox>
              </gridcolumn>
              </grid>
              </canvas>

Superclass Chain

gridcolumn

Known Subclasses

Details

Properties (5)

colwidth
<attribute name="colwidth" value="${this.width - (this.resizable ? 4 : 2) }" />
private var colwidth;
resizable
<attribute name="resizable" type="boolean" value="true" />
public var resizable : boolean;
If set to false, the column cannot be resized.
resizemargin
<attribute name="resizemargin" type="number" value="3" />
public var resizemargin : Number;
The width of the resizer between columns.
showheader
<attribute name="showheader" type="boolean" value="true" />
public var showheader : boolean;
If set to false, then no header will be shown for this column.
sortable
<attribute name="sortable" type="boolean" value="true" />
public var sortable : boolean;
If true, the column header is clickable and will initiate a sort

Methods (2)

_applystyle()
<method name="_applystyle" args="s" />
private function _applystyle(s);
init()
<method name="init" />
private function init();

LZX Synopsis

<class name="lz.gridcolumn">
  <attribute name=" colwidth " value="${this.width - (this.resizable ? 4 : 2) }" />
  <attribute name=" resizable " type="boolean" value="true" />
  <attribute name=" resizemargin " type="number" value="3" />
  <attribute name=" showheader " type="boolean" value="true" />
  <attribute name=" sortable " type="boolean" value="true" />
  <method name=" _applystyle " args="s" />
  <method name=" init " />
</class>

JavaScript Synopsis

public lz.gridcolumn {
  private var colwidth ;
  public var resizable  : boolean;
  public var resizemargin  : Number;
  public var showheader  : boolean;
  public var sortable  : boolean;
  prototype private function _applystyle (s);
  prototype private function init ();
}