0

Editable data grid with sum of each values in the footer

asked 2020-07-27 02:30:21 +0800

Pramil gravatar image Pramil
1 2

I need to create a functionality as follows

  1. render list into editable data grid
  2. Under each column, need to display sum values, if they are integers
  3. If we change values in grid, sum of the specific column should change as per the new value

If it is possible in zk grid, please help

delete flag offensive retag edit

Comments

which pattern do you prefer? MVC or MVVM?

hawk ( 2020-07-27 09:44:42 +0800 )edit

MVVM

Pramil ( 2020-07-27 11:04:38 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-07-27 13:08:28 +0800

hawk gravatar image hawk
2630 1 5
http://hawkphoenix.blogsp... ZK Team

You can render a ListModel with zk grid in MVVM pattern, please refer to http://books.zkoss.org/zk-mvvm-book/8.0/databinding/collectionand_selection.html

To listen to values change, you can render a <intbox>/<decimalbox> in a row and specify a command binding at onChange event:

<intbox onChange="@command('update')"/>

In that method, you can update the sum of the corresponding column.

If you want more powerful formula features, please use Keiaki.

If you still encounter problems, please describe specific and technical details.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2020-07-27 02:30:21 +0800

Seen: 9 times

Last updated: Jul 27

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More