Servis-Rhino 4211B Betriebsanweisung Seite 180

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 298
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 179
field – The identity of the field in a row of data that should be shown in cell.
name – The column name of the column
decorator – A function that takes (data, row.id, row.visualIndex) as parameters and
returns the content of the cell. If not supplied, the data of the cell itself is returned.
editor – The class name of the Dijit widget to show for editing
editorArgs –
width – The width of the column in CSS units
editable – whether or not the cell is editable
If we need to change the structure after the grid has been created, we can call the setColumns()
method which takes an array of column objects as a parameter.
Within the GridX package, there is an object called "Row" that owns a row in the grid. This can be
returned by a "model.byId()" function call.
Within the Row there are some important functions:
getData() - Get the grid data of this row.
getItem() - Get the store item of this row.
Notes:
If we use GridX inside a custom widget, do not "startup" GridX until the startup of the
enclosing widget itself. If we start it too early, it doesn't seem to remove the "No Data"
overlay.
We can replace the data associated with a Grid using the "setStore()" method found on the
grid.
See Also:
GridX at github
GridX home page
GridX Width and Height
The width and height of the grid should be supplied. Setting the property called "autoWidth" to
"true" results in the width of the grid being calculated from the width of the columns.
There is also a property called "autoHeight". If set to true, then the grid will always show all of
its content.
The grid also provides paging support via the modules called "gridx/modules/Pagination"
and "gridx/modules/pagination/PaginationBar".
GridX - Adding and removing rows
A new row can be added into the Grid by accessing the store object and invoking the add method.
We can delete a row using the store associated with the grid.
grid.store.remove(row.id);
Page 180
Seitenansicht 179
1 2 ... 175 176 177 178 179 180 181 182 183 184 185 ... 297 298

Kommentare zu diesen Handbüchern

Keine Kommentare