Besides creating {@link Row} programmingly, you can assign a data model (a{@link ListModel} or {@link GroupsModel} instance) to a grid via{@link #setModel(ListModel)} or {@link #setModel(GroupsModel)} and then thegrid will retrieve data by calling {@link ListModel#getElementAt} whennecessary.
Besides assign a list model, you could assign a renderer (a {@link RowRenderer} instance) to a grid, such that the grid will use thisrenderer to render the data returned by {@link ListModel#getElementAt}. If not assigned, the default renderer, which assumes a label per row, is used. In other words, the default renderer adds a label to a row by calling toString against the object returned by {@link ListModel#getElementAt}
There are two ways to handle long content: scrolling and paging. If {@link #getMold} is "default", scrolling is used if {@link #setHeight} iscalled and too much content to display. If {@link #getMold} is "paging",paging is used if two or more pages are required. To control the number of rows to display in a page, use {@link #setPageSize}.
If paging is used, the page controller is either created automatically or assigned explicity by {@link #setPaginal}. The paging controller specified explicitly by {@link #setPaginal} is called the external page controller. Itis useful if you want to put the paging controller at different location (other than as a child component), or you want to use the same controller to control multiple grids.
Default {@link #getZclass}: z-grid.(since 3.5.0)
To have a grid without stripping, you can specify a non-existent style class to {@link #setOddRowSclass}. @since 3.5.2 @author tomyeh @see ListModel @see RowRenderer @see org.zkoss.zul.RowRendererExt
|
|
|
|