initvalue.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Initialize Value for 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>Initialize Value for ComboGrid</h2>
  14. <p>Initialize value when ComboGrid is created.</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. idField: 'itemid',
  21. textField: 'productname',
  22. url: 'datagrid_data1.json',
  23. method: 'get',
  24. value: 'EST-12',
  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: 'Select Item:',
  35. labelPosition: 'top'
  36. ">
  37. </select>
  38. </div>
  39. </div>
  40. </body>
  41. </html>