Freeze Rows and Columns"

From Documentation
m (Created page with '{{ZKSpreadsheetEssentialsPageHeader}} __TOC__ ZK Spreadsheet can freeze row or column use Spreadsheet.setRowfreeze() and Spreadsheet.setColumnfreeze() ==Scenario== User can ri…')
 
m
Line 8: Line 8:
 
User can right click cell to open popup menu and select row or column freeze
 
User can right click cell to open popup menu and select row or column freeze
  
 +
===ZUML Example===
 
<source lang="xml" high="4,12,14,15,16,21,23,24,25">
 
<source lang="xml" high="4,12,14,15,16,21,23,24,25">
 
<zk>
 
<zk>
Line 41: Line 42:
 
</source>
 
</source>
  
===ZUML Example===
+
===Open cell menu===
 +
<source lang="java" high="4">
 +
Spreadsheet spreadsheet;
 +
Menupopup cellMenu;
 +
public void onCellRightClick$spreadsheet(CellMouseEvent event) {
 +
cellMenu.open(event.getPageX(), event.getPageY());
 +
}
 +
</source>
  
 
=Version History=
 
=Version History=

Revision as of 09:20, 18 November 2010


ZK Spreadsheet can freeze row or column use Spreadsheet.setRowfreeze() and Spreadsheet.setColumnfreeze()

Scenario

User can right click cell to open popup menu and select row or column freeze

ZUML Example

<zk>
	<div height="100%" width="100%" apply="demo.FreezeComposer">
		<div height="3px"></div>
		<spreadsheet id="spreadsheet" src="/demo_sample.xls"	
			maxrows="200" 
			maxcolumns="40"
			width="100%"
			height="450px"></spreadsheet>
		<menupopup id="cellMenu">
			<menu label="Freeze Row">
				<menupopup>
					<menuitem id="unfreezeRows" label="Unfreeze all rows" />
					<menuseparator />
					<menuitem label="Freeze Row 1" forward="onFreezeRow(0)"/>
					<menuitem label="Freeze Row 2" forward="onFreezeRow(1)"/>
					<menuitem label="Freeze Row 3" forward="onFreezeRow(2)"/>
				</menupopup>
			</menu>
			<menu label="Freeze Col">
				<menupopup>
					<menuitem id="unfreezeCols" label="Unfreeze all cols" />
					<menuseparator />
					<menuitem label="Freeze Col 1" forward="onFreezeCol(0)"/>
					<menuitem label="Freeze Col 2" forward="onFreezeCol(1)"/>
					<menuitem label="Freeze Col 3" forward="onFreezeCol(2)"/>
				</menupopup>
			</menu>
		</menupopup>
	</div>
</zk>

Open cell menu

Spreadsheet spreadsheet;
Menupopup cellMenu;
public void onCellRightClick$spreadsheet(CellMouseEvent event) {
	cellMenu.open(event.getPageX(), event.getPageY());
}

Version History

Last Update : 2010/11/18


Version Date Content
     


All source code listed in this book is at Github.


Last Update : 2010/11/18

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