fluid.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Fluid ComboGrid - jQuery EasyUI Demo</title>
  6. <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
  7. <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
  8. <link rel="stylesheet" type="text/css" href="../demo.css">
  9. <script type="text/javascript" src="../../jquery.min.js"></script>
  10. <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
  11. </head>
  12. <body>
  13. <h2>Fluid ComboGrid</h2>
  14. <p>This example shows how to set the width of ComboGrid to a percentage of its parent container.</p>
  15. <div style="margin:20px 0"></div>
  16. <div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
  17. <div style="margin-bottom:20px">
  18. <select class="easyui-combogrid" style="width:100%" data-options="
  19. panelWidth: 500,
  20. panelMinWidth: '50%',
  21. idField: 'itemid',
  22. textField: 'productname',
  23. url: 'datagrid_data1.json',
  24. method: 'get',
  25. columns: [[
  26. {field:'itemid',title:'Item ID',width:80},
  27. {field:'productname',title:'Product',width:120},
  28. {field:'listprice',title:'List Price',width:80,align:'right'},
  29. {field:'unitcost',title:'Unit Cost',width:80,align:'right'},
  30. {field:'attr1',title:'Attribute',width:200},
  31. {field:'status',title:'Status',width:60,align:'center'}
  32. ]],
  33. fitColumns: true,
  34. label: 'width: 100%',
  35. labelPosition: 'top'
  36. ">
  37. </select>
  38. </div>
  39. <div style="margin-bottom:20px">
  40. <select class="easyui-combogrid" style="width:50%" data-options="
  41. panelWidth: 500,
  42. panelMinWidth: '50%',
  43. idField: 'itemid',
  44. textField: 'productname',
  45. url: 'datagrid_data1.json',
  46. method: 'get',
  47. columns: [[
  48. {field:'itemid',title:'Item ID',width:80},
  49. {field:'productname',title:'Product',width:120},
  50. {field:'listprice',title:'List Price',width:80,align:'right'},
  51. {field:'unitcost',title:'Unit Cost',width:80,align:'right'},
  52. {field:'attr1',title:'Attribute',width:200},
  53. {field:'status',title:'Status',width:60,align:'center'}
  54. ]],
  55. fitColumns: true,
  56. label: 'width: 50%',
  57. labelPosition: 'top'
  58. ">
  59. </select>
  60. </div>
  61. </div>
  62. </body>
  63. </html>