jqGrid提供了表格底部汇总、合计行功能,我们先看下user-guide关于jqGrid合计行都有哪些说明?然后再看个DEMO,看看jqGrid表格底部汇总、合计行到底如何实现。

  1、user-guide关于jqGrid合计行的说明

  1)表格配置:footerrow, boolean, 默认false

  If set to true this will place a footer table with one row below the gird records and above the pager. The number of columns equal those specified in colModel

  表格是否显示底部合计行。

  2)表格配置:userDataOnFooter,boolean,默认false

  When set to true we directly place the user data array userData in the footer if the footerrow parameter is set to true. The rules are as follows: If the userData array contains a name which matches any name defined in colModel, then the value is placed in that column. If there are no such values nothing is placed. Note that if this option is used we use the current formatter options (if available) for that column. See footerData method.