source: ether_statistics/web/resources/js/Wijmo.2.2.2/Wijmo-Complete/development-bundle/samples/grid/sorting.html @ 649

Last change on this file since 649 was 649, checked in by vmipsl, 12 years ago

wijmo

File size: 6.0 KB
Line 
1<!doctype html>
2<html lang="en">
3<head>
4    <title>Grid - Sorting</title>
5    <meta charset="utf-8" />
6    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
7    <meta name="description" content="wijgrid provides sorting feature" />
8    <meta name="keywords" content="" />
9    <meta name="author" content="ComponentOne" />
10   
11    <link href="../../themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" />
12    <link href="../../themes/wijmo/jquery.wijmo-open.2.2.2.css" rel="stylesheet" type="text/css" />
13    <link href="../../themes/wijmo/jquery.wijmo.wijgrid.css" rel="stylesheet" type="text/css" />
14
15    <script src="../../external/jquery-1.8.0.min.js" type="text/javascript"></script>
16    <script src="../../external/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script>
17    <script src="../../external/globalize.min.js" type="text/javascript"></script>
18    <script src="../../external/jquery.mousewheel.min.js" type="text/javascript"></script>
19
20    <script src="../../external/jquery.wijmo-open.all.2.2.2.min.js" type="text/javascript"></script>
21    <script src="../../wijmo/jquery.wijmo.wijdatasource.js" type="text/javascript"></script>
22    <script src="../../wijmo/jquery.wijmo.wijgrid.js" type="text/javascript"></script>
23
24    <script id="scriptInit" type="text/javascript">
25        $(document).ready(function () {
26            $("#demo").wijgrid({
27                allowSorting: true,
28                data: [
29                    [1, 'Malkin', 'Pit', 7, 2, 6, 8, 0, 29, '20:10', 2, 2, 24],
30                    [2, 'Talbot', 'Pit', 7, 4, 2, 6, 4, 14, '16:35', 0, 0, 14],
31                    [3, 'Zetterberg', 'Det', 7, 2, 4, 6, 3, 7, '22:15', 1, 2, 23],
32                    [4, 'Franzen', 'Det', 7, 2, 2, 4, -1, 2, '19:27', 1, 1, 20],
33                    [5, 'Rafalski', 'Det', 7, 1, 3, 4, 3, 0, '21:44', 1, 0, 5],
34                    [6, 'Letang', 'Pit', 7, 1, 3, 4, -2, 0, '19:09', 1, 2, 11],
35                    [7, 'Kennedy', 'Pit', 7, 2, 1, 3, 2, 0, '12:50', 0, 0, 17],
36                    [8, 'Ericsson', 'Det', 7, 2, 1, 3, 1, 4, '16:04', 0, 0, 8],
37                    [9, 'Staal', 'Pit', 7, 2, 1, 3, 0, 2, '18:20', 0, 1, 17],
38                    [10, 'Fedotenko', 'Pit', 7, 1, 2, 3, 3, 0, '15:43', 0, 0, 15],
39                    [11, 'Crosby', 'Pit', 7, 1, 2, 3, -3, 2, '18:39', 0, 1, 16],
40                    [12, 'Lidstrom', 'Det', 7, 0, 3, 3, 4, 0, '1:06', 0, 1, 14],
41                    [13, 'Hudler', 'Det', 7, 0, 3, 3, 2, 0, '11:30', 0, 1, 6],
42                    [14, 'Hossa', 'Det', 7, 0, 3, 3, 0, 2, '18:37', 0, 0, 23],
43                    [15, 'Abdelkader', 'Det', 3, 2, 0, 2, 2, 0, '7:15', 0, 0, 4],
44                    [16, 'Filppula', 'Det', 7, 2, 0, 2, -1, 2, '18:40', 0, 0, 9],
45                    [17, 'Stuart', 'Det', 7, 2, 0, 2, -3, 2, '22:10', 0, 0, 6],
46                    [18, 'Gonchar', 'Pit', 7, 1, 1, 2, 0, 2, '22:42', 1, 1, 9],
47                    [19, 'Kronwall', 'Det', 7, 1, 1, 2, 0, 8, '22:01', 1, 1, 8],
48                    [20, 'Helm', 'Det', 7, 1, 1, 2, -1, 0, '14:15', 0, 0, 15],
49                    [21, 'Datsyuk', 'Det', 3, 0, 2, 2, 1, 0, '18:53', 0, 1, 5],
50                    [22, 'Leino', 'Det', 4, 0, 2, 2, 2, 0, '9:17', 0, 0, 6],
51                    [23, 'Scuderi', 'Pit', 7, 0, 2, 2, 1, 0, '19:26', 0, 0, 1],
52                    [24, 'Kunitz', 'Pit', 7, 0, 2, 2, -3, 4, '16:12', 0, 0, 12],
53                    [25, 'Holmstrom', 'Det', 7, 0, 2, 2, -3, 2, '12:49', 0, 0, 9],
54                    [26, 'Draper', 'Det', 4, 1, 0, 1, 0, 0, '6:59', 0, 0, 2],
55                    [27, 'Cleary', 'Det', 7, 1, 0, 1, 1, 4, '16:45', 0, 0, 19],
56                    [28, 'Samuelss.', 'Det', 7, 0, 1, 1, 1, 2, '14:35', 0, 1, 13],
57                    [29, 'Guerin', 'Pit', 7, 0, 1, 1, -3, 4, '15:55', 0, 1, 20],
58                    [30, 'Eaton', 'Pit', 7, 0, 1, 1, -6, 4, '18:27', 0, 0, 4],
59                    [31, 'Sykora', 'Pit', 1, 0, 0, 0, 0, 0, '6:31', 0, 0, 0],
60                    [32, 'Boucher', 'Pit', 1, 0, 0, 0, -1, 0, '11:01', 0, 0, 1],
61                    [33, 'Dupuis', 'Pit', 6, 0, 0, 0, -2, 2, '8:20', 0, 0, 3],
62                    [34, 'Satan', 'Pit', 6, 0, 0, 0, -4, 2, '8:56', 0, 0, 5],
63                    [35, 'Gill', 'Pit', 7, 0, 0, 0, 2, 2, '18:23', 0, 0, 2],
64                    [36, 'Maltby', 'Det', 7, 0, 0, 0, 1, 0, '9:07', 0, 0, 6],
65                    [37, 'Lebda', 'Det', 7, 0, 0, 0, 1, 12, '11:08', 0, 0, 2],
66                    [38, 'Cooke', 'Pit', 7, 0, 0, 0, 0, 10, '14:34', 0, 0, 7],
67                    [39, 'Orpik', 'Pit', 7, 0, 0, 0, 0, 6, '20:05', 0, 0, 5],
68                    [40, 'Adams', 'Pit', 7, 0, 0, 0, -3, 12, '9:59', 0, 0, 4]
69                ],
70                columns: [
71                    { headerText: ''}, { headerText: 'Skaters' }, { headerText: 'Tm' }, { headerText: 'GP' },
72                    { headerText: 'G' }, { headerText: 'A' }, { headerText: 'PTS' }, { headerText: '+/-' },
73                    { headerText: 'PIM' }, { headerText: 'PPG' }, { headerText: 'PPA' }, { headerText: 'SOG' },
74                    { headerText: 'SPCT' }
75                ]
76            });
77        });
78    </script>
79</head>
80<body class="demo-single">
81    <div class="container">
82        <div class="header">
83            <h2>
84                Sorting</h2>
85        </div>
86        <div class="main demo">
87            <!-- Begin demo markup -->
88            <div class="ui-widget ui-widget-header ui-corner-all">
89                2009 Stanley Cup Finals
90            </div>
91            <table id="demo">
92            </table>
93            <!-- End demo markup -->
94            <div class="demo-options">
95                <!-- Begin options markup -->
96                <!-- End options markup -->
97            </div>
98        </div>
99        <div class="footer demo-description">
100            <p>
101             To enable sorting, the allowSorting option should be set to true. Once the allowSorting option is set to true, you can determine the sort direction. In this sample, the sort direction is set to ascending.
102            </p>
103        </div>
104    </div>
105</body>
106</html>
Note: See TracBrowser for help on using the repository browser.