navigation.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Navigate 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>Navigate ComboGrid</h2>
  14. <p>Navigate through grid items with keyboard to select an item.</p>
  15. <div style="margin:20px 0">
  16. <input type="checkbox" checked onchange="$('#cc').combogrid({selectOnNavigation:$(this).is(':checked')})">
  17. <span>SelectOnNavigation</span>
  18. </div>
  19. <div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
  20. <div style="margin-bottom:20px">
  21. <select id="cc" class="easyui-combogrid" style="width:100%" data-options="
  22. panelWidth: 500,
  23. idField: 'itemid',
  24. textField: 'productname',
  25. url: 'datagrid_data1.json',
  26. method: 'get',
  27. columns: [[
  28. {field:'itemid',title:'Item ID',width:80},
  29. {field:'productname',title:'Product',width:120},
  30. {field:'listprice',title:'List Price',width:80,align:'right'},
  31. {field:'unitcost',title:'Unit Cost',width:80,align:'right'},
  32. {field:'attr1',title:'Attribute',width:200},
  33. {field:'status',title:'Status',width:60,align:'center'}
  34. ]],
  35. fitColumns: true,
  36. label: 'Select Item:',
  37. labelPosition: 'top'
  38. ">
  39. </select>
  40. </div>
  41. </div>
  42. </body>
  43. </html>