Servis-Rhino 4211B Guía de usuario Pagina 179

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 298
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 178
columnIndex could be negative to indicate that the column is sorted descending. The first column
is "1". Consider using Math.abs(columnIndex) to get the absolute value.
Cell events
When the mouse is over a cell, the onCellMouseOver event can be used to detect that. The
event passed in has a property called "cell" that is an object. This has a property called "index"
which is the numeric index of the column that the cell belongs in (0 is the first column). Other cell
related events include:
onCellClick
GridX – The next generation Dojo Data Grid?
GridX is a new and modern table system for Dojo.
GridX can be downloaded from the GridX home page. It arrives as a set of JavaScript source files.
It is expected to be loaded from the package that starts with "gridx".
It requires a style sheet called
gridx/resources/claro/Gridx.css
The following AMD packages should be included:
Package Alias
dojo/store/Memory
Memory
gridx/core/model/cache/Sync
Cache
gridx/Grid
Grid
Here is a sample of GridX:
var structure = [
{ id: 'name', field: 'name', name: 'Name', width: '50px'},
{ id: 'city', field: 'city', name: 'City'},
{ id: 'score', field: 'score', name: 'Score', width: '80px'}
];
var store = new Memory({
data: [
{ id: 1, name: 'John', score: 130, city: 'New York', birthday: '1980/2/5'},
{ id: 2, name: 'Alice', score: 123, city: 'Washington', birthday: '1984/3/7'},
{ id: 3, name: 'Lee', score: 149, city: 'Shanghai', birthday: '1986/10/8'},
{ id: 4, name: 'Mike', score: 100, city: 'London', birthday: '1988/8/12'},
{ id: 5, name: 'Tom', score: 89, city: 'San Francisco', birthday: '1990/1/21'}
]
});
var grid = new Grid({
cacheClass: Cache,
store: store,
structure: structure,
style: "height: 500px;"
});
grid.placeAt("someNode");
grid.startup();
Gridx has a property called "structure" which is the column layout of the table. It consists of an
array of objects where each object has the following properties:
Page 179
Vista de pagina 178
1 2 ... 174 175 176 177 178 179 180 181 182 183 184 ... 297 298

Comentarios a estos manuales

Sin comentarios