grid4.htm 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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"
  6. type="text/css" />
  7. <script src="../../../lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  8. <script src="../../../lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  9. <script src="../../../lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  10. <script src="../../../lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
  11. <script src="../ProductData.js" type="text/javascript"></script>
  12. <script type="text/javascript">
  13. $(function () {
  14. $("#maingrid").ligerGrid({
  15. columns: [
  16. {
  17. display: '产品', columns:
  18. [
  19. { display: '主键', name: 'ProductID', type: 'int', totalSummary:
  20. {
  21. type: 'count'
  22. }
  23. },
  24. { display: '产品名', name: 'ProductName', align: 'left', width: 100 },
  25. { display: '单价', name: 'UnitPrice', align: 'right', type: 'float',
  26. totalSummary:
  27. {
  28. type: 'sum,max'
  29. }
  30. }
  31. ]
  32. },
  33. {
  34. display: '仓库数量', name: 'UnitsInStock', align: 'right', type: 'float',
  35. totalSummary:
  36. {
  37. type: 'sum'
  38. }
  39. }
  40. ]
  41. , isScroll: false, data: ProductData, sortName: 'ProductID'
  42. });
  43. });
  44. </script>
  45. </head>
  46. <body>
  47. <div id="maingrid">
  48. </div>
  49. <div style="display: none;">
  50. </div>
  51. </body>
  52. </html>