2016-11-29 91 views
0

我正在使用Dojo框架來創建數據網格。頁面和網格加載後,選擇任何行。點擊並長按垂直滾動,可以看到垂直滾動條向後滾動。此問題僅在第一次出現。我知道,這很奇怪。但我想知道是什麼導致了這個特殊問題。 請與下面的HTML代碼嘗試,Dojo DataGrid垂直向後滾動

<!DOCTYPE HTML> 
 
<html lang="en"> 
 
<head> 
 
\t <meta charset="utf-8"> 
 
\t <title>Demo: dojox/grid/DataGrid Simple Structure</title> 
 
\t <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dijit/themes/claro/claro.css" media="screen"> 
 
\t <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/resources/dojo.css" /> 
 
\t <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojox/grid/resources/claroGrid.css" /> 
 
<style> 
 
#grid { 
 
\t width: 560px; 
 
\t height: 300px; 
 
} 
 
</style> 
 
</head> 
 
<body class="claro"> 
 
<h1>Demo: dojox/grid/DataGrid Simple Structure</h1> 
 

 
<br/> 
 
<div id="grid"></div> 
 

 
<!-- load dojo --> 
 
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js"></script> 
 
<script> 
 
\t var gridData = { 
 
\t "items": [ 
 
\t \t { 
 
\t \t \t "bats": "R", 
 
\t \t \t "birthDate": "1934-2-5", 
 
\t \t \t "deathDate": null, 
 
\t \t \t "debut": "4/13/1954 0:00:00", 
 
\t \t \t "finalGame": "10/3/1976 0:00:00", 
 
\t \t \t "first": "Hank", 
 
\t \t \t "height": 72.0, 
 
\t \t \t "id": "aaronha01", 
 
\t \t \t "last": "Aaron", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Hammer,Hammerin' Hank,Bad Henry", 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 624, 
 
\t \t \t "total3B": 98, 
 
\t \t \t "totalAB": 12364, 
 
\t \t \t "totalBB": 1402, 
 
\t \t \t "totalCS": 73, 
 
\t \t \t "totalG": 3298, 
 
\t \t \t "totalGAB": 3298, 
 
\t \t \t "totalGIDP": 328, 
 
\t \t \t "totalH": 3771, 
 
\t \t \t "totalHBP": 32, 
 
\t \t \t "totalHR": 755, 
 
\t \t \t "totalIBB": 293, 
 
\t \t \t "totalK": 1383, 
 
\t \t \t "totalR": 2174, 
 
\t \t \t "totalRBI": 2297, 
 
\t \t \t "totalSB": 240, 
 
\t \t \t "totalSF": 121, 
 
\t \t \t "totalSH": 21, 
 
\t \t \t "weight": 180.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "R", 
 
\t \t \t "birthDate": "1887-2-26", 
 
\t \t \t "deathDate": "1950-11-4", 
 
\t \t \t "debut": "4/15/1911 0:00:00", 
 
\t \t \t "finalGame": "5/28/1930 0:00:00", 
 
\t \t \t "first": "Pete", 
 
\t \t \t "height": 73.0, 
 
\t \t \t "id": "alexape01", 
 
\t \t \t "last": "Alexander", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Old Pete", 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 60, 
 
\t \t \t "total3B": 13, 
 
\t \t \t "totalAB": 1810, 
 
\t \t \t "totalBB": 77, 
 
\t \t \t "totalCS": 5, 
 
\t \t \t "totalG": 703, 
 
\t \t \t "totalGAB": 703, 
 
\t \t \t "totalGIDP": null, 
 
\t \t \t "totalH": 378, 
 
\t \t \t "totalHBP": 2, 
 
\t \t \t "totalHR": 11, 
 
\t \t \t "totalIBB": null, 
 
\t \t \t "totalK": 276, 
 
\t \t \t "totalR": 154, 
 
\t \t \t "totalRBI": 163, 
 
\t \t \t "totalSB": 3, 
 
\t \t \t "totalSF": null, 
 
\t \t \t "totalSH": 88, 
 
\t \t \t "weight": 185.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "R", 
 
\t \t \t "birthDate": "1852-4-17", 
 
\t \t \t "deathDate": "1922-4-14", 
 
\t \t \t "debut": "5/6/1871 0:00:00", 
 
\t \t \t "finalGame": "10/3/1897 0:00:00", 
 
\t \t \t "first": "Cap", 
 
\t \t \t "height": 72.0, 
 
\t \t \t "id": "ansonca01", 
 
\t \t \t "last": "Anson", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Pop", 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 581, 
 
\t \t \t "total3B": 142, 
 
\t \t \t "totalAB": 10277, 
 
\t \t \t "totalBB": 983, 
 
\t \t \t "totalCS": 16, 
 
\t \t \t "totalG": 2523, 
 
\t \t \t "totalGAB": 2523, 
 
\t \t \t "totalGIDP": null, 
 
\t \t \t "totalH": 3418, 
 
\t \t \t "totalHBP": 32, 
 
\t \t \t "totalHR": 97, 
 
\t \t \t "totalIBB": null, 
 
\t \t \t "totalK": 302, 
 
\t \t \t "totalR": 1996, 
 
\t \t \t "totalRBI": 2076, 
 
\t \t \t "totalSB": 276, 
 
\t \t \t "totalSF": null, 
 
\t \t \t "totalSH": 27, 
 
\t \t \t "weight": 227.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "R", 
 
\t \t \t "birthDate": "1934-4-29", 
 
\t \t \t "deathDate": null, 
 
\t \t \t "debut": "4/17/1956 0:00:00", 
 
\t \t \t "finalGame": "9/28/1973 0:00:00", 
 
\t \t \t "first": "Luis", 
 
\t \t \t "height": 69.0, 
 
\t \t \t "id": "aparilu01", 
 
\t \t \t "last": "Aparicio", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Little Louie", 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 394, 
 
\t \t \t "total3B": 92, 
 
\t \t \t "totalAB": 10230, 
 
\t \t \t "totalBB": 736, 
 
\t \t \t "totalCS": 136, 
 
\t \t \t "totalG": 2601, 
 
\t \t \t "totalGAB": 2601, 
 
\t \t \t "totalGIDP": 184, 
 
\t \t \t "totalH": 2677, 
 
\t \t \t "totalHBP": 27, 
 
\t \t \t "totalHR": 83, 
 
\t \t \t "totalIBB": 22, 
 
\t \t \t "totalK": 742, 
 
\t \t \t "totalR": 1335, 
 
\t \t \t "totalRBI": 791, 
 
\t \t \t "totalSB": 506, 
 
\t \t \t "totalSF": 76, 
 
\t \t \t "totalSH": 161, 
 
\t \t \t "weight": 160.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "R", 
 
\t \t \t "birthDate": "1907-4-2", 
 
\t \t \t "deathDate": "1991-1-3", 
 
\t \t \t "debut": "9/10/1930 0:00:00", 
 
\t \t \t "finalGame": "10/1/1950 0:00:00", 
 
\t \t \t "first": "Luke", 
 
\t \t \t "height": 70.0, 
 
\t \t \t "id": "applilu01", 
 
\t \t \t "last": "Appling", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Old Aches and Pains,Luscious Luke", 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 440, 
 
\t \t \t "total3B": 102, 
 
\t \t \t "totalAB": 8856, 
 
\t \t \t "totalBB": 1302, 
 
\t \t \t "totalCS": 108, 
 
\t \t \t "totalG": 2422, 
 
\t \t \t "totalGAB": 2422, 
 
\t \t \t "totalGIDP": 129, 
 
\t \t \t "totalH": 2749, 
 
\t \t \t "totalHBP": 11, 
 
\t \t \t "totalHR": 45, 
 
\t \t \t "totalIBB": null, 
 
\t \t \t "totalK": 528, 
 
\t \t \t "totalR": 1319, 
 
\t \t \t "totalRBI": 1116, 
 
\t \t \t "totalSB": 179, 
 
\t \t \t "totalSF": null, 
 
\t \t \t "totalSH": 74, 
 
\t \t \t "weight": 183.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "L", 
 
\t \t \t "birthDate": "1927-3-19", 
 
\t \t \t "deathDate": "1997-9-9", 
 
\t \t \t "debut": "4/20/1948 0:00:00", 
 
\t \t \t "finalGame": "9/30/1962 0:00:00", 
 
\t \t \t "first": "Richie", 
 
\t \t \t "height": 70.0, 
 
\t \t \t "id": "ashburi01", 
 
\t \t \t "last": "Ashburn", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Whitey,Put Put", 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 317, 
 
\t \t \t "total3B": 109, 
 
\t \t \t "totalAB": 8365, 
 
\t \t \t "totalBB": 1198, 
 
\t \t \t "totalCS": 92, 
 
\t \t \t "totalG": 2189, 
 
\t \t \t "totalGAB": 2189, 
 
\t \t \t "totalGIDP": 83, 
 
\t \t \t "totalH": 2574, 
 
\t \t \t "totalHBP": 43, 
 
\t \t \t "totalHR": 29, 
 
\t \t \t "totalIBB": 25, 
 
\t \t \t "totalK": 571, 
 
\t \t \t "totalR": 1322, 
 
\t \t \t "totalRBI": 586, 
 
\t \t \t "totalSB": 234, 
 
\t \t \t "totalSF": 18, 
 
\t \t \t "totalSH": 112, 
 
\t \t \t "weight": 170.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "L", 
 
\t \t \t "birthDate": "1902-5-21", 
 
\t \t \t "deathDate": "1983-8-16", 
 
\t \t \t "debut": "4/16/1929 0:00:00", 
 
\t \t \t "finalGame": "4/25/1941 0:00:00", 
 
\t \t \t "first": "Earl", 
 
\t \t \t "height": 69.0, 
 
\t \t \t "id": "averiea01", 
 
\t \t \t "last": "Averill", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Rock,The Earl of Snohomish", 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 401, 
 
\t \t \t "total3B": 128, 
 
\t \t \t "totalAB": 6353, 
 
\t \t \t "totalBB": 774, 
 
\t \t \t "totalCS": 57, 
 
\t \t \t "totalG": 1668, 
 
\t \t \t "totalGAB": 1668, 
 
\t \t \t "totalGIDP": 7, 
 
\t \t \t "totalH": 2019, 
 
\t \t \t "totalHBP": 33, 
 
\t \t \t "totalHR": 238, 
 
\t \t \t "totalIBB": null, 
 
\t \t \t "totalK": 518, 
 
\t \t \t "totalR": 1224, 
 
\t \t \t "totalRBI": 1164, 
 
\t \t \t "totalSB": 70, 
 
\t \t \t "totalSF": null, 
 
\t \t \t "totalSH": 55, 
 
\t \t \t "weight": 172.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "L", 
 
\t \t \t "birthDate": "1886-3-13", 
 
\t \t \t "deathDate": "1963-6-28", 
 
\t \t \t "debut": "9/21/1908 0:00:00", 
 
\t \t \t "finalGame": "9/29/1922 0:00:00", 
 
\t \t \t "first": "Frank", 
 
\t \t \t "height": 71.0, 
 
\t \t \t "id": "bakerfr01", 
 
\t \t \t "last": "Baker", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Home Run", 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 315, 
 
\t \t \t "total3B": 103, 
 
\t \t \t "totalAB": 5984, 
 
\t \t \t "totalBB": 473, 
 
\t \t \t "totalCS": 28, 
 
\t \t \t "totalG": 1575, 
 
\t \t \t "totalGAB": 1575, 
 
\t \t \t "totalGIDP": null, 
 
\t \t \t "totalH": 1838, 
 
\t \t \t "totalHBP": 50, 
 
\t \t \t "totalHR": 96, 
 
\t \t \t "totalIBB": null, 
 
\t \t \t "totalK": 182, 
 
\t \t \t "totalR": 887, 
 
\t \t \t "totalRBI": 987, 
 
\t \t \t "totalSB": 235, 
 
\t \t \t "totalSF": null, 
 
\t \t \t "totalSH": 153, 
 
\t \t \t "weight": 173.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "B", 
 
\t \t \t "birthDate": "1891-4-20", 
 
\t \t \t "deathDate": "1972-10-9", 
 
\t \t \t "debut": "4/14/1915 0:00:00", 
 
\t \t \t "finalGame": "5/31/1930 0:00:00", 
 
\t \t \t "first": "Dave", 
 
\t \t \t "height": 69.0, 
 
\t \t \t "id": "bancrda01", 
 
\t \t \t "last": "Bancroft", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Beauty", 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 320, 
 
\t \t \t "total3B": 77, 
 
\t \t \t "totalAB": 7182, 
 
\t \t \t "totalBB": 827, 
 
\t \t \t "totalCS": 75, 
 
\t \t \t "totalG": 1913, 
 
\t \t \t "totalGAB": 1913, 
 
\t \t \t "totalGIDP": null, 
 
\t \t \t "totalH": 2004, 
 
\t \t \t "totalHBP": 23, 
 
\t \t \t "totalHR": 32, 
 
\t \t \t "totalIBB": null, 
 
\t \t \t "totalK": 487, 
 
\t \t \t "totalR": 1048, 
 
\t \t \t "totalRBI": 591, 
 
\t \t \t "totalSB": 145, 
 
\t \t \t "totalSF": null, 
 
\t \t \t "totalSH": 212, 
 
\t \t \t "weight": 160.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "R", 
 
\t \t \t "birthDate": "1931-1-31", 
 
\t \t \t "deathDate": null, 
 
\t \t \t "debut": "9/17/1953 0:00:00", 
 
\t \t \t "finalGame": "9/26/1971 0:00:00", 
 
\t \t \t "first": "Ernie", 
 
\t \t \t "height": 73.0, 
 
\t \t \t "id": "bankser01", 
 
\t \t \t "last": "Banks", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Mr. Cub", 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 407, 
 
\t \t \t "total3B": 90, 
 
\t \t \t "totalAB": 9421, 
 
\t \t \t "totalBB": 763, 
 
\t \t \t "totalCS": 53, 
 
\t \t \t "totalG": 2528, 
 
\t \t \t "totalGAB": 2528, 
 
\t \t \t "totalGIDP": 229, 
 
\t \t \t "totalH": 2583, 
 
\t \t \t "totalHBP": 70, 
 
\t \t \t "totalHR": 512, 
 
\t \t \t "totalIBB": 198, 
 
\t \t \t "totalK": 1236, 
 
\t \t \t "totalR": 1305, 
 
\t \t \t "totalRBI": 1636, 
 
\t \t \t "totalSB": 50, 
 
\t \t \t "totalSF": 96, 
 
\t \t \t "totalSH": 45, 
 
\t \t \t "weight": 180.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "L", 
 
\t \t \t "birthDate": "1867-8-4", 
 
\t \t \t "deathDate": "1918-6-25", 
 
\t \t \t "debut": "6/20/1888 0:00:00", 
 
\t \t \t "finalGame": "6/15/1907 0:00:00", 
 
\t \t \t "first": "Jake", 
 
\t \t \t "height": 70.0, 
 
\t \t \t "id": "becklja01", 
 
\t \t \t "last": "Beckley", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Eagle Eye", 
 
\t \t \t "throws": "L", 
 
\t \t \t "total2B": 473, 
 
\t \t \t "total3B": 243, 
 
\t \t \t "totalAB": 9526, 
 
\t \t \t "totalBB": 616, 
 
\t \t \t "totalCS": null, 
 
\t \t \t "totalG": 2386, 
 
\t \t \t "totalGAB": 2386, 
 
\t \t \t "totalGIDP": null, 
 
\t \t \t "totalH": 2930, 
 
\t \t \t "totalHBP": 183, 
 
\t \t \t "totalHR": 86, 
 
\t \t \t "totalIBB": null, 
 
\t \t \t "totalK": 270, 
 
\t \t \t "totalR": 1600, 
 
\t \t \t "totalRBI": 1575, 
 
\t \t \t "totalSB": 315, 
 
\t \t \t "totalSF": null, 
 
\t \t \t "totalSH": 145, 
 
\t \t \t "weight": 200.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "R", 
 
\t \t \t "birthDate": "1947-12-7", 
 
\t \t \t "deathDate": null, 
 
\t \t \t "debut": "8/28/1967 0:00:00", 
 
\t \t \t "finalGame": "9/29/1983 0:00:00", 
 
\t \t \t "first": "Johnny", 
 
\t \t \t "height": 73.0, 
 
\t \t \t "id": "benchjo01", 
 
\t \t \t "last": "Bench", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Little General", 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 381, 
 
\t \t \t "total3B": 24, 
 
\t \t \t "totalAB": 7658, 
 
\t \t \t "totalBB": 891, 
 
\t \t \t "totalCS": 43, 
 
\t \t \t "totalG": 2158, 
 
\t \t \t "totalGAB": 2158, 
 
\t \t \t "totalGIDP": 201, 
 
\t \t \t "totalH": 2048, 
 
\t \t \t "totalHBP": 19, 
 
\t \t \t "totalHR": 389, 
 
\t \t \t "totalIBB": 135, 
 
\t \t \t "totalK": 1278, 
 
\t \t \t "totalR": 1091, 
 
\t \t \t "totalRBI": 1376, 
 
\t \t \t "totalSB": 68, 
 
\t \t \t "totalSF": 90, 
 
\t \t \t "totalSH": 11, 
 
\t \t \t "weight": 197.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "R", 
 
\t \t \t "birthDate": "1884-5-5", 
 
\t \t \t "deathDate": "1954-5-22", 
 
\t \t \t "debut": "4/20/1903 0:00:00", 
 
\t \t \t "finalGame": "7/21/1925 0:00:00", 
 
\t \t \t "first": "Chief", 
 
\t \t \t "height": 74.0, 
 
\t \t \t "id": "bendech01", 
 
\t \t \t "last": "Bender", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": null, 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 40, 
 
\t \t \t "total3B": 10, 
 
\t \t \t "totalAB": 1147, 
 
\t \t \t "totalBB": 75, 
 
\t \t \t "totalCS": 0, 
 
\t \t \t "totalG": 507, 
 
\t \t \t "totalGAB": 507, 
 
\t \t \t "totalGIDP": 0, 
 
\t \t \t "totalH": 243, 
 
\t \t \t "totalHBP": 10, 
 
\t \t \t "totalHR": 6, 
 
\t \t \t "totalIBB": 0, 
 
\t \t \t "totalK": 48, 
 
\t \t \t "totalR": 102, 
 
\t \t \t "totalRBI": 116, 
 
\t \t \t "totalSB": 20, 
 
\t \t \t "totalSF": 0, 
 
\t \t \t "totalSH": 42, 
 
\t \t \t "weight": 185.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "L", 
 
\t \t \t "birthDate": "1925-5-12", 
 
\t \t \t "deathDate": null, 
 
\t \t \t "debut": "9/22/1946 0:00:00", 
 
\t \t \t "finalGame": "5/9/1965 0:00:00", 
 
\t \t \t "first": "Yogi", 
 
\t \t \t "height": 67.0, 
 
\t \t \t "id": "berrayo01", 
 
\t \t \t "last": "Berra", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": null, 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 321, 
 
\t \t \t "total3B": 49, 
 
\t \t \t "totalAB": 7555, 
 
\t \t \t "totalBB": 704, 
 
\t \t \t "totalCS": 26, 
 
\t \t \t "totalG": 2120, 
 
\t \t \t "totalGAB": 2120, 
 
\t \t \t "totalGIDP": 146, 
 
\t \t \t "totalH": 2150, 
 
\t \t \t "totalHBP": 52, 
 
\t \t \t "totalHR": 358, 
 
\t \t \t "totalIBB": 49, 
 
\t \t \t "totalK": 414, 
 
\t \t \t "totalR": 1175, 
 
\t \t \t "totalRBI": 1430, 
 
\t \t \t "totalSB": 30, 
 
\t \t \t "totalSF": 44, 
 
\t \t \t "totalSH": 9, 
 
\t \t \t "weight": 185.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "L", 
 
\t \t \t "birthDate": "1958-6-15", 
 
\t \t \t "deathDate": null, 
 
\t \t \t "debut": "4/10/1982 0:00:00", 
 
\t \t \t "finalGame": "8/27/1999 0:00:00", 
 
\t \t \t "first": "Wade", 
 
\t \t \t "height": 74.0, 
 
\t \t \t "id": "boggswa01", 
 
\t \t \t "last": "Boggs", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": null, 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 578, 
 
\t \t \t "total3B": 61, 
 
\t \t \t "totalAB": 9180, 
 
\t \t \t "totalBB": 1412, 
 
\t \t \t "totalCS": 35, 
 
\t \t \t "totalG": 2440, 
 
\t \t \t "totalGAB": 2439, 
 
\t \t \t "totalGIDP": 236, 
 
\t \t \t "totalH": 3010, 
 
\t \t \t "totalHBP": 23, 
 
\t \t \t "totalHR": 118, 
 
\t \t \t "totalIBB": 180, 
 
\t \t \t "totalK": 745, 
 
\t \t \t "totalR": 1513, 
 
\t \t \t "totalRBI": 1014, 
 
\t \t \t "totalSB": 24, 
 
\t \t \t "totalSF": 96, 
 
\t \t \t "totalSH": 29, 
 
\t \t \t "weight": 190.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "L", 
 
\t \t \t "birthDate": "1900-4-23", 
 
\t \t \t "deathDate": "1959-12-11", 
 
\t \t \t "debut": "8/18/1922 0:00:00", 
 
\t \t \t "finalGame": "9/16/1937 0:00:00", 
 
\t \t \t "first": "Jim", 
 
\t \t \t "height": 72.0, 
 
\t \t \t "id": "bottoji01", 
 
\t \t \t "last": "Bottomley", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Sunny Jim", 
 
\t \t \t "throws": "L", 
 
\t \t \t "total2B": 465, 
 
\t \t \t "total3B": 151, 
 
\t \t \t "totalAB": 7471, 
 
\t \t \t "totalBB": 664, 
 
\t \t \t "totalCS": 15, 
 
\t \t \t "totalG": 1991, 
 
\t \t \t "totalGAB": 1991, 
 
\t \t \t "totalGIDP": 33, 
 
\t \t \t "totalH": 2313, 
 
\t \t \t "totalHBP": 43, 
 
\t \t \t "totalHR": 219, 
 
\t \t \t "totalIBB": null, 
 
\t \t \t "totalK": 591, 
 
\t \t \t "totalR": 1177, 
 
\t \t \t "totalRBI": 1422, 
 
\t \t \t "totalSB": 58, 
 
\t \t \t "totalSF": null, 
 
\t \t \t "totalSH": 177, 
 
\t \t \t "weight": 180.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "R", 
 
\t \t \t "birthDate": "1917-7-17", 
 
\t \t \t "deathDate": "2001-8-10", 
 
\t \t \t "debut": "9/9/1938 0:00:00", 
 
\t \t \t "finalGame": "8/24/1952 0:00:00", 
 
\t \t \t "first": "Lou", 
 
\t \t \t "height": 71.0, 
 
\t \t \t "id": "boudrlo01", 
 
\t \t \t "last": "Boudreau", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Old Shufflefoot,Handsome Lou", 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 385, 
 
\t \t \t "total3B": 66, 
 
\t \t \t "totalAB": 6029, 
 
\t \t \t "totalBB": 796, 
 
\t \t \t "totalCS": 50, 
 
\t \t \t "totalG": 1646, 
 
\t \t \t "totalGAB": 1646, 
 
\t \t \t "totalGIDP": 155, 
 
\t \t \t "totalH": 1779, 
 
\t \t \t "totalHBP": 34, 
 
\t \t \t "totalHR": 68, 
 
\t \t \t "totalIBB": null, 
 
\t \t \t "totalK": 309, 
 
\t \t \t "totalR": 861, 
 
\t \t \t "totalRBI": 789, 
 
\t \t \t "totalSB": 51, 
 
\t \t \t "totalSF": null, 
 
\t \t \t "totalSH": 164, 
 
\t \t \t "weight": 185.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "R", 
 
\t \t \t "birthDate": "1879-6-11", 
 
\t \t \t "deathDate": "1944-12-4", 
 
\t \t \t "debut": "8/27/1897 0:00:00", 
 
\t \t \t "finalGame": "10/3/1915 0:00:00", 
 
\t \t \t "first": "Roger", 
 
\t \t \t "height": 69.0, 
 
\t \t \t "id": "bresnro01", 
 
\t \t \t "last": "Bresnahan", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "The Duke Of Tralee", 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 218, 
 
\t \t \t "total3B": 71, 
 
\t \t \t "totalAB": 4481, 
 
\t \t \t "totalBB": 714, 
 
\t \t \t "totalCS": 3, 
 
\t \t \t "totalG": 1446, 
 
\t \t \t "totalGAB": 1446, 
 
\t \t \t "totalGIDP": null, 
 
\t \t \t "totalH": 1252, 
 
\t \t \t "totalHBP": 67, 
 
\t \t \t "totalHR": 26, 
 
\t \t \t "totalIBB": null, 
 
\t \t \t "totalK": 99, 
 
\t \t \t "totalR": 682, 
 
\t \t \t "totalRBI": 530, 
 
\t \t \t "totalSB": 212, 
 
\t \t \t "totalSF": null, 
 
\t \t \t "totalSH": 112, 
 
\t \t \t "weight": 200.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "L", 
 
\t \t \t "birthDate": "1953-5-15", 
 
\t \t \t "deathDate": null, 
 
\t \t \t "debut": "8/2/1973 0:00:00", 
 
\t \t \t "finalGame": "10/3/1993 0:00:00", 
 
\t \t \t "first": "George", 
 
\t \t \t "height": 72.0, 
 
\t \t \t "id": "brettge01", 
 
\t \t \t "last": "Brett", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Mullet", 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 665, 
 
\t \t \t "total3B": 137, 
 
\t \t \t "totalAB": 10349, 
 
\t \t \t "totalBB": 1096, 
 
\t \t \t "totalCS": 97, 
 
\t \t \t "totalG": 2707, 
 
\t \t \t "totalGAB": 2707, 
 
\t \t \t "totalGIDP": 235, 
 
\t \t \t "totalH": 3154, 
 
\t \t \t "totalHBP": 33, 
 
\t \t \t "totalHR": 317, 
 
\t \t \t "totalIBB": 229, 
 
\t \t \t "totalK": 908, 
 
\t \t \t "totalR": 1583, 
 
\t \t \t "totalRBI": 1595, 
 
\t \t \t "totalSB": 201, 
 
\t \t \t "totalSF": 120, 
 
\t \t \t "totalSH": 26, 
 
\t \t \t "weight": 185.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "L", 
 
\t \t \t "birthDate": "1939-6-18", 
 
\t \t \t "deathDate": null, 
 
\t \t \t "debut": "9/10/1961 0:00:00", 
 
\t \t \t "finalGame": "9/30/1979 0:00:00", 
 
\t \t \t "first": "Lou", 
 
\t \t \t "height": 71.0, 
 
\t \t \t "id": "brocklo01", 
 
\t \t \t "last": "Brock", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": null, 
 
\t \t \t "throws": "L", 
 
\t \t \t "total2B": 486, 
 
\t \t \t "total3B": 141, 
 
\t \t \t "totalAB": 10332, 
 
\t \t \t "totalBB": 761, 
 
\t \t \t "totalCS": 307, 
 
\t \t \t "totalG": 2616, 
 
\t \t \t "totalGAB": 2616, 
 
\t \t \t "totalGIDP": 114, 
 
\t \t \t "totalH": 3023, 
 
\t \t \t "totalHBP": 49, 
 
\t \t \t "totalHR": 149, 
 
\t \t \t "totalIBB": 124, 
 
\t \t \t "totalK": 1730, 
 
\t \t \t "totalR": 1610, 
 
\t \t \t "totalRBI": 900, 
 
\t \t \t "totalSB": 938, 
 
\t \t \t "totalSF": 46, 
 
\t \t \t "totalSH": 47, 
 
\t \t \t "weight": 170.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "L", 
 
\t \t \t "birthDate": "1858-5-8", 
 
\t \t \t "deathDate": "1932-8-2", 
 
\t \t \t "debut": "6/23/1879 0:00:00", 
 
\t \t \t "finalGame": "10/4/1904 0:00:00", 
 
\t \t \t "first": "Dan", 
 
\t \t \t "height": 74.0, 
 
\t \t \t "id": "broutda01", 
 
\t \t \t "last": "Brouthers", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Big Dan", 
 
\t \t \t "throws": "L", 
 
\t \t \t "total2B": 460, 
 
\t \t \t "total3B": 205, 
 
\t \t \t "totalAB": 6711, 
 
\t \t \t "totalBB": 840, 
 
\t \t \t "totalCS": null, 
 
\t \t \t "totalG": 1673, 
 
\t \t \t "totalGAB": 1673, 
 
\t \t \t "totalGIDP": null, 
 
\t \t \t "totalH": 2296, 
 
\t \t \t "totalHBP": 105, 
 
\t \t \t "totalHR": 106, 
 
\t \t \t "totalIBB": null, 
 
\t \t \t "totalK": 238, 
 
\t \t \t "totalR": 1523, 
 
\t \t \t "totalRBI": 1296, 
 
\t \t \t "totalSB": 256, 
 
\t \t \t "totalSF": null, 
 
\t \t \t "totalSH": 2, 
 
\t \t \t "weight": 207.0 
 
\t \t }, 
 
\t \t 
 
\t \t { 
 
\t \t \t "bats": "R", 
 
\t \t \t "birthDate": "1955-9-16", 
 
\t \t \t "deathDate": null, 
 
\t \t \t "debut": "4/5/1974 0:00:00", 
 
\t \t \t "finalGame": "10/3/1993 0:00:00", 
 
\t \t \t "first": "Robin", 
 
\t \t \t "height": 72.0, 
 
\t \t \t "id": "yountro01", 
 
\t \t \t "last": "Yount", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": null, 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 583, 
 
\t \t \t "total3B": 126, 
 
\t \t \t "totalAB": 11008, 
 
\t \t \t "totalBB": 966, 
 
\t \t \t "totalCS": 105, 
 
\t \t \t "totalG": 2856, 
 
\t \t \t "totalGAB": 2856, 
 
\t \t \t "totalGIDP": 217, 
 
\t \t \t "totalH": 3142, 
 
\t \t \t "totalHBP": 48, 
 
\t \t \t "totalHR": 251, 
 
\t \t \t "totalIBB": 95, 
 
\t \t \t "totalK": 1350, 
 
\t \t \t "totalR": 1632, 
 
\t \t \t "totalRBI": 1406, 
 
\t \t \t "totalSB": 271, 
 
\t \t \t "totalSF": 123, 
 
\t \t \t "totalSH": 104, 
 
\t \t \t "weight": 165.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "L", 
 
\t \t \t "birthDate": "1858-5-8", 
 
\t \t \t "deathDate": "1932-8-2", 
 
\t \t \t "debut": "6/23/1879 0:00:00", 
 
\t \t \t "finalGame": "10/4/1904 0:00:00", 
 
\t \t \t "first": "Dan", 
 
\t \t \t "height": 74.0, 
 
\t \t \t "id": "broutda01", 
 
\t \t \t "last": "Brouthers", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Big Dan", 
 
\t \t \t "throws": "L", 
 
\t \t \t "total2B": 460, 
 
\t \t \t "total3B": 205, 
 
\t \t \t "totalAB": 6711, 
 
\t \t \t "totalBB": 840, 
 
\t \t \t "totalCS": null, 
 
\t \t \t "totalG": 1673, 
 
\t \t \t "totalGAB": 1673, 
 
\t \t \t "totalGIDP": null, 
 
\t \t \t "totalH": 2296, 
 
\t \t \t "totalHBP": 105, 
 
\t \t \t "totalHR": 106, 
 
\t \t \t "totalIBB": null, 
 
\t \t \t "totalK": 238, 
 
\t \t \t "totalR": 1523, 
 
\t \t \t "totalRBI": 1296, 
 
\t \t \t "totalSB": 256, 
 
\t \t \t "totalSF": null, 
 
\t \t \t "totalSH": 2, 
 
\t \t \t "weight": 207.0 
 
\t \t }, 
 
\t \t 
 
\t \t { 
 
\t \t \t "bats": "R", 
 
\t \t \t "birthDate": "1955-9-16", 
 
\t \t \t "deathDate": null, 
 
\t \t \t "debut": "4/5/1974 0:00:00", 
 
\t \t \t "finalGame": "10/3/1993 0:00:00", 
 
\t \t \t "first": "Robin", 
 
\t \t \t "height": 72.0, 
 
\t \t \t "id": "yountro01", 
 
\t \t \t "last": "Yount", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": null, 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 583, 
 
\t \t \t "total3B": 126, 
 
\t \t \t "totalAB": 11008, 
 
\t \t \t "totalBB": 966, 
 
\t \t \t "totalCS": 105, 
 
\t \t \t "totalG": 2856, 
 
\t \t \t "totalGAB": 2856, 
 
\t \t \t "totalGIDP": 217, 
 
\t \t \t "totalH": 3142, 
 
\t \t \t "totalHBP": 48, 
 
\t \t \t "totalHR": 251, 
 
\t \t \t "totalIBB": 95, 
 
\t \t \t "totalK": 1350, 
 
\t \t \t "totalR": 1632, 
 
\t \t \t "totalRBI": 1406, 
 
\t \t \t "totalSB": 271, 
 
\t \t \t "totalSF": 123, 
 
\t \t \t "totalSH": 104, 
 
\t \t \t "weight": 165.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "L", 
 
\t \t \t "birthDate": "1858-5-8", 
 
\t \t \t "deathDate": "1932-8-2", 
 
\t \t \t "debut": "6/23/1879 0:00:00", 
 
\t \t \t "finalGame": "10/4/1904 0:00:00", 
 
\t \t \t "first": "Dan", 
 
\t \t \t "height": 74.0, 
 
\t \t \t "id": "broutda01", 
 
\t \t \t "last": "Brouthers", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Big Dan", 
 
\t \t \t "throws": "L", 
 
\t \t \t "total2B": 460, 
 
\t \t \t "total3B": 205, 
 
\t \t \t "totalAB": 6711, 
 
\t \t \t "totalBB": 840, 
 
\t \t \t "totalCS": null, 
 
\t \t \t "totalG": 1673, 
 
\t \t \t "totalGAB": 1673, 
 
\t \t \t "totalGIDP": null, 
 
\t \t \t "totalH": 2296, 
 
\t \t \t "totalHBP": 105, 
 
\t \t \t "totalHR": 106, 
 
\t \t \t "totalIBB": null, 
 
\t \t \t "totalK": 238, 
 
\t \t \t "totalR": 1523, 
 
\t \t \t "totalRBI": 1296, 
 
\t \t \t "totalSB": 256, 
 
\t \t \t "totalSF": null, 
 
\t \t \t "totalSH": 2, 
 
\t \t \t "weight": 207.0 
 
\t \t }, 
 
\t \t 
 
\t \t { 
 
\t \t \t "bats": "R", 
 
\t \t \t "birthDate": "1955-9-16", 
 
\t \t \t "deathDate": null, 
 
\t \t \t "debut": "4/5/1974 0:00:00", 
 
\t \t \t "finalGame": "10/3/1993 0:00:00", 
 
\t \t \t "first": "Robin", 
 
\t \t \t "height": 72.0, 
 
\t \t \t "id": "yountro01", 
 
\t \t \t "last": "Yount", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": null, 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 583, 
 
\t \t \t "total3B": 126, 
 
\t \t \t "totalAB": 11008, 
 
\t \t \t "totalBB": 966, 
 
\t \t \t "totalCS": 105, 
 
\t \t \t "totalG": 2856, 
 
\t \t \t "totalGAB": 2856, 
 
\t \t \t "totalGIDP": 217, 
 
\t \t \t "totalH": 3142, 
 
\t \t \t "totalHBP": 48, 
 
\t \t \t "totalHR": 251, 
 
\t \t \t "totalIBB": 95, 
 
\t \t \t "totalK": 1350, 
 
\t \t \t "totalR": 1632, 
 
\t \t \t "totalRBI": 1406, 
 
\t \t \t "totalSB": 271, 
 
\t \t \t "totalSF": 123, 
 
\t \t \t "totalSH": 104, 
 
\t \t \t "weight": 165.0 
 
\t \t }, 
 
\t \t { 
 
\t \t \t "bats": "L", 
 
\t \t \t "birthDate": "1858-5-8", 
 
\t \t \t "deathDate": "1932-8-2", 
 
\t \t \t "debut": "6/23/1879 0:00:00", 
 
\t \t \t "finalGame": "10/4/1904 0:00:00", 
 
\t \t \t "first": "Dan", 
 
\t \t \t "height": 74.0, 
 
\t \t \t "id": "broutda01", 
 
\t \t \t "last": "Brouthers", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": "Big Dan", 
 
\t \t \t "throws": "L", 
 
\t \t \t "total2B": 460, 
 
\t \t \t "total3B": 205, 
 
\t \t \t "totalAB": 6711, 
 
\t \t \t "totalBB": 840, 
 
\t \t \t "totalCS": null, 
 
\t \t \t "totalG": 1673, 
 
\t \t \t "totalGAB": 1673, 
 
\t \t \t "totalGIDP": null, 
 
\t \t \t "totalH": 2296, 
 
\t \t \t "totalHBP": 105, 
 
\t \t \t "totalHR": 106, 
 
\t \t \t "totalIBB": null, 
 
\t \t \t "totalK": 238, 
 
\t \t \t "totalR": 1523, 
 
\t \t \t "totalRBI": 1296, 
 
\t \t \t "totalSB": 256, 
 
\t \t \t "totalSF": null, 
 
\t \t \t "totalSH": 2, 
 
\t \t \t "weight": 207.0 
 
\t \t }, 
 
\t \t 
 
\t \t { 
 
\t \t \t "bats": "R", 
 
\t \t \t "birthDate": "1955-9-16", 
 
\t \t \t "deathDate": null, 
 
\t \t \t "debut": "4/5/1974 0:00:00", 
 
\t \t \t "finalGame": "10/3/1993 0:00:00", 
 
\t \t \t "first": "Robin", 
 
\t \t \t "height": 72.0, 
 
\t \t \t "id": "yountro01", 
 
\t \t \t "last": "Yount", 
 
\t \t \t "nameNote": null, 
 
\t \t \t "nickname": null, 
 
\t \t \t "throws": "R", 
 
\t \t \t "total2B": 583, 
 
\t \t \t "total3B": 126, 
 
\t \t \t "totalAB": 11008, 
 
\t \t \t "totalBB": 966, 
 
\t \t \t "totalCS": 105, 
 
\t \t \t "totalG": 2856, 
 
\t \t \t "totalGAB": 2856, 
 
\t \t \t "totalGIDP": 217, 
 
\t \t \t "totalH": 3142, 
 
\t \t \t "totalHBP": 48, 
 
\t \t \t "totalHR": 251, 
 
\t \t \t "totalIBB": 95, 
 
\t \t \t "totalK": 1350, 
 
\t \t \t "totalR": 1632, 
 
\t \t \t "totalRBI": 1406, 
 
\t \t \t "totalSB": 271, 
 
\t \t \t "totalSF": 123, 
 
\t \t \t "totalSH": 104, 
 
\t \t \t "weight": 165.0 
 
\t \t }, 
 
\t \t 
 
\t ] 
 
}; 
 

 
\t var grid, dataStore, store; 
 
\t require([ 
 
\t \t "dojox/grid/DataGrid", 
 
\t \t "dojo/store/Memory", 
 
\t \t "dojo/data/ObjectStore", 
 
\t \t "dojo/request", 
 
\t \t "dojo/domReady!" 
 
\t ], function(DataGrid, Memory, ObjectStore,request){ 
 
\t \t \t store = new Memory({ data: gridData.items }); 
 
\t \t \t dataStore = new ObjectStore({ objectStore: store }); 
 

 
\t \t \t grid = new DataGrid({ 
 
\t \t \t \t store: dataStore, 
 
\t \t \t \t query: { id: "*" }, 
 
\t \t \t \t structure: [ 
 
\t \t \t \t \t { name: "First Name", field: "first", width: "84px" }, 
 
\t \t \t \t \t { name: "Last Name", field: "last", width: "84px" }, 
 
\t \t \t \t \t { name: "Bats", field: "bats", width: "70px" }, 
 
\t \t \t \t \t { name: "Throws", field: "throws", width: "70px" }, 
 
\t \t \t \t \t { name: "G", field: "totalG", width: "60px" }, 
 
\t \t \t \t \t { name: "AB", field: "totalAB", width: "60px" }, 
 
\t \t \t \t \t { name: "Games as Batter", field: "totalGAB", width: "120px" }, 
 
\t \t \t \t \t { name: "R", field: "totalR", width: "60px" }, 
 
\t \t \t \t \t { name: "RBI", field: "totalRBI", width: "60px" }, 
 
\t \t \t \t \t { name: "BB", field: "totalBB", width: "60px" }, 
 
\t \t \t \t \t { name: "K", field: "totalK", width: "60px" }, 
 
\t \t \t \t \t { name: "H", field: "totalH", width: "60px" }, 
 
\t \t \t \t \t { name: "2B", field: "total2B", width: "60px" }, 
 
\t \t \t \t \t { name: "3B", field: "total3B", width: "60px" }, 
 
\t \t \t \t \t { name: "HR", field: "totalHR", width: "60px" } 
 
\t \t \t \t ] 
 
\t \t \t }); 
 

 
\t \t \t grid.placeAt("grid"); 
 
\t \t \t // since we created this grid programmatically, call startup to render it 
 
\t \t \t //grid.startup(); 
 
\t \t \t 
 
\t \t \t grid.startup(); 
 
\t \t \t //grid.selection.setSelected(0, false); 
 
\t \t \t //grid.selection.clear(); 
 
\t \t \t //grid.setScrollTop(10); 
 
\t \t \t /*grid.on('MouseUp',function(event) { 
 
\t \t \t \t //console.log("mouseup ==>"+grid.scrollTop); 
 
\t \t \t \t //console.log(document.getElementById("grid").scrollHeight); 
 
\t \t \t \t grid.setScrollTop(document.getElementById("grid").scrollHeight); 
 
      }); 
 
\t \t \t 
 
\t \t \t grid.on('MouseDown',function(event){ 
 
       //console.log("mousedown ==>"+grid.scrollTop); 
 
      }); 
 

 
\t \t \t */ 
 
\t \t }); 
 
\t 
 

 
\t function getSelectedRows() { 
 
\t \t var items = grid.selection.getSelected(); 
 
\t \t alert(items.length); 
 
\t } 
 
</script> 
 
<input type="button" value="GetSelectedRows" onclick="getSelectedRows()"> 
 
</body> 
 
</html>

回答

0

這是因爲dojox/grid/DataGridinfinite scroll,所以,當滾動它會分頁的數據,如果你檢查的dojox/grid/DataGrid源你會發現它從dojox/grid/_Grid延伸,它包括dojox/grid/_Scroller_Scroller寄存器到onscroll事件domNodeinit功能:

if(this.scrollboxNode){ 
    this.scrollboxNode.scrollTop = 0; 
    this.scroll(0); 
    this.scrollboxNode.onscroll = lang.hitch(this, 'onscroll'); 
} 

onscroll功能是用來計算頁面顯示

onscroll: function(){ 
    this.scroll(this.scrollboxNode.scrollTop); 
}, 
scroll: function(inTop){ 
    this.grid.scrollTop = inTop; 
    if(this.colCount){ 
     this.startPacify(); 
     this.findPage(inTop); 
     var h = this.height; 
     var b = this.getScrollBottom(inTop); 
     for(var p=this.page, y=this.pageTop; (p<this.pageCount)&&((b<0)||(y<b)); p++){ 
      y += this.needPage(p, y); 
     } 
     this.firstVisibleRow = this.getFirstVisibleRow(this.page, this.pageTop, inTop); 
     this.lastVisibleRow = this.getLastVisibleRow(p - 1, y, b); 
     // indicates some page size has been updated 
     if(h != this.height){ 
      this.repositionPages(p-1); 
     } 
     this.endPacify(); 
    } 
}, 

這是在動作的功能碼,其餘都在dojox/grid/DataGriddojox/grid/_Grid

希望這有助於清除頭腦