totalgridall.htm 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title></title>
  5. <link href="../../../lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  6. <script src="../../../lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  7. <script src="../../../lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  8. <script src="../../../lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  9. <script src="../AllProductData.js" type="text/javascript"></script>
  10. <script type="text/javascript">
  11. $(function () {
  12. $("#maingrid").ligerGrid({
  13. columns: [
  14. { display: '主键', name: 'ProductID', type: 'int', totalSummary:
  15. {
  16. type: 'count'
  17. }
  18. },
  19. { display: '产品名', name: 'ProductName', align: 'left', width: 200 },
  20. { display: '单价', name: 'UnitPrice', align: 'right', type:'float',
  21. totalSummary:
  22. {
  23. render: function (suminf, column, cell)
  24. {
  25. return '<div>最大值:' + suminf.max + '</div>';
  26. },
  27. align: 'left'
  28. }
  29. },
  30. { display: '仓库数量', name: 'UnitsInStock', align: 'right', type: 'float',
  31. totalSummary:
  32. {
  33. type: 'sum'
  34. }
  35. }
  36. ], dataAction: 'local',
  37. data: AllProductData, sortName: 'ProductID',
  38. showTitle: false, totalRender: f_totalRender,
  39. width: '100%', height: '100%',heightDiff:-10
  40. });
  41. $("#pageloading").hide();
  42. });
  43. function f_totalRender(data, currentPageData)
  44. {
  45. return "总仓库数量:"+data.UnitsInStockTotal;
  46. }
  47. </script>
  48. </head>
  49. <body style="padding:6px; overflow:hidden; ">
  50. <div id="maingrid" style="margin:0; padding:0"></div>
  51. <div style="display:none;">
  52. <!-- g data total ttt -->
  53. </div>
  54. </body>
  55. </html>