|
21 | 21 | </head> |
22 | 22 | <body> |
23 | 23 | <table id="grid"></table> |
24 | | - <script src="../../../../data-files/northwind.js"></script> |
| 24 | + <script src="../../../../data-files/adventureworks.min.js"></script> |
25 | 25 | <script> |
26 | 26 | $(function () { |
27 | 27 | $( "#grid" ).igGrid( { |
28 | 28 | autoGenerateColumns: false, |
29 | 29 | autofitLastColumn: false, |
| 30 | + renderCheckboxes: true, |
30 | 31 | width: "100%", |
31 | 32 | columns: [ |
32 | | - { headerText: "$$(Northwind_Employees_FirstName)", key: "FirstName", dataType: "string", width: "10%" }, |
33 | | - { headerText: "$$(Northwind_Employees_LastName)", key: "LastName", dataType: "string", width: "10%" }, |
34 | | - { headerText: "$$(Northwind_Employees_Title)", key: "Title", dataType: "string", width: "17%" }, |
35 | | - { headerText: "$$(Northwind_Employees_BirthDate)", key: "BirthDate", dataType: "date", width: "8%" }, |
36 | | - { headerText: "$$(Northwind_Employees_Notes)", key: "Notes", dataType: "string", width: "55%", template: "<p class='tooltip-grid-notes'> ${Notes} </p>" } |
| 33 | + { headerText: "$$ (AdventureWorks_Products_Name"), key: "Name", dataType: "string", width: "20%" }, |
| 34 | + { headerText: "$$ (AdventureWorks_Products_ProductNumber"), key: "ProductNumber", dataType: "string", width: "20%" }, |
| 35 | + { headerText: "$$ (AdventureWorks_Products_MakeFlag)", key: "MakeFlag", dataType: "bool", width: "10%" }, |
| 36 | + { headerText: "$$ (AdventureWorks_Products_ReorderPoint)", key: "ReorderPoint", dataType: "number", width: "10%" }, |
| 37 | + { headerText: "$$ (AdventureWorks_Products_SellStartDate)", key: "SellStartDate", dataType: "date", width: "15%" } |
37 | 38 | ], |
38 | | - dataSource: northwind, |
39 | | - responseDataKey: "results", |
| 39 | + dataSource: adventureWorks.slice(0, 10), |
40 | 40 | features: [ |
41 | 41 | { |
42 | 42 | name: "Tooltips", |
43 | 43 | columnSettings: [ |
44 | | - { columnKey: "FirstName", allowTooltips: false }, |
45 | | - { columnKey: "LastName", allowTooltips: false } |
| 44 | + { columnKey: "Name", allowTooltips: false }, |
| 45 | + { columnKey: "MakeFlag", allowTooltips: false } |
46 | 46 | ], |
47 | 47 | style: Modernizr.touch ? "popover" : "tooltip", |
48 | 48 | visibility: "always" |
|
52 | 52 | enableVerticalRendering: false, |
53 | 53 | columnSettings: [ |
54 | 54 | { |
55 | | - columnKey: "LastName", |
| 55 | + columnKey: "MakeFlag", |
56 | 56 | classes: "ui-hidden-phone" |
57 | 57 | }, |
58 | 58 | { |
59 | | - columnKey: "Title", |
| 59 | + columnKey: "ReorderPoint", |
60 | 60 | classes: "ui-hidden-phone" |
61 | 61 | }, |
62 | 62 | { |
63 | | - columnKey: "BirthDate", |
| 63 | + columnKey: "SellStartDate", |
64 | 64 | classes: "ui-hidden-phone" |
65 | 65 | } |
66 | 66 | ] |
|
0 commit comments