Handling Events

From Documentation
⧼coll-notfound_msg⧽

Return to Documentation.




When a user interacts with Spreadsheet like clicking or editing, these actions trigger events being sent to the server. We can implement our business logic in a event listener, a method in a controller, to listen events we are interested in. When the event we listen is triggered, our special business logic is performed. This mechanism helps you customize Spreadsheet furthermore to fulfill your business needs.

ZK Spreadsheet supports numerous events such as mouse events, key events, selection events, editing events and hyperlink events. You can listen to these events to apply customized function upon your business requirement. For example by listening to editing events such as onStartEditing and onStopEditing you can control which cell the user can edit, what is entered/edited and possibly apply some styling or value transformation once the editing is stopped. Similarly, you can also listen to mouse events such as onCellClick or onCellRightClick and update other ZK components or pop up a menu.