From Documentation

Jump to: navigation, search

Available in ZK Spreadsheet EE only

Freeze rows or columns is useful when displaying lots of data. Range allows you to freeze rows and columns easily like:

//freeze first row and first column

range.setFreezePanel(0, 0);

This method accepts row and column number starting from 1 as a parameter. Calling these methods will take effect on the sheet that Range represents only. Passing 0 means to unfreeze it.

The screenshot below is the example application to demonstrate the API usage. If we click "Freeze" button, it will freeze row and column according to current selection.


The code is like:

public class FreezeComposer extends SelectorComposer<Component> {

	private Spreadsheet ss;

	@Listen("onClick = #freezeButton")
	public void freeze() {
		.setFreezePanel(ss.getSelection().getRow(), ss.getSelection().getColumn());
	@Listen("onClick = #unfreezeButton")
	public void unfreeze() {

All source code listed in this book is at Github.

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.