Listheader
- Demonstration: Listbox (Sorting)
- Java API: org.zkoss.zul.Listheader
- JavaScript API: zul.sel.Listheader
Employment/Purpose
The list header which defines the attributes and header of a columen of
a list box. Its parent must be Listhead.
Example

<window title="listbox demo" border="normal" width="250px">
<listbox id="box">
<listhead sizable="true">
<listheader label="name" sort="auto"/>
<listheader label="gender" sort="auto"/>
</listhead>
<listitem>
<listcell label="Mary"/>
<listcell label="FEMALE"/>
</listitem>
<listitem>
<listcell label="John"/>
<listcell label="MALE"/>
</listitem>
<listitem>
<listcell label="Jane"/>
<listcell label="FEMALE"/>
</listitem>
<listitem>
<listcell label="Henry"/>
<listcell label="MALE"/>
</listitem>
<listfoot >
<listfooter><label value="This is footer1"/></listfooter>
<listfooter><label value="This is footer2"/></listfooter>
</listfoot>
</listbox>
</window>
Multiline Listheader
<listheader id="lh_usrAccountnonlocked" sort="auto">
<label value="none &'#'10;&'#'13; locked &'#'10;&'#'13; "
width="85%" sclass="word-wrap" multiline="true">
</label>
</listheader>
Supported Events
| Name | Event Type |
|---|---|
onSort |
Event: org.zkoss.zk.ui.event.SortEvent Denotes user has sorted the row of this column. |
onGroup |
Event: org.zkoss.zk.ui.event.SortEvent *(1) *(2) Denotes user has grouped all the cells under a column. |
onUngroup |
Event: org.zkoss.zk.ui.event.SortEvent *(1) *(2) Denotes user has ungrouped all the cells under a column. |
*(1)
*(2) since 6.5.0
- Inherited Supported Events: HeaderElement
Supported Children
*ALL
Version History
| Version | Date | Content |
|---|---|---|
| 6.5.0 | June 2012 | ZK-120: Provide menupopup=”auto” for listbox |
| 6.5.0 | June 2012 | ZK-147: Support ungroup for grid’s column menu |