openpsa / jsgrid

Fork of last jqGrid version before license change
http://openpsa.github.io/jsgrid/
Other
28 stars 12 forks source link

Allow multiple rows in footer table #3

Open flack opened 9 years ago

flack commented 9 years ago

There are some situations where it would be nice if we could have more than one row in the footer table, e.g. when you have an invoice table like this:

Item Price
Item 1 20
Item 2 25
---------
Sum 45
VAT 5
Total 50
OlegKi commented 9 years ago

It's possible to implement. The old answer provide the corresponding implementation example. One can provide more comfortable feature to create multiline footer, but one should make detailed suggestion about the new options which can be easy to understand and to use.

flack commented 9 years ago

@OlegKi: Do you think we would need new options for this? I would imagine we could change the code so that userdata and footerdata accept arrays of rows. Something like this:

$('#grid').jqGrid({
    //...
}).jqGrid("footerData", "set", [{/* footer row 1 */}, {/* footer row 2 */}]);