Servis-Rhino 4211B Guia do Utilizador Página 181

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 298
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 180
See also:
Object Stores and Data Stores
GridX Modules
The architecture of GridX is such that it has a set of optional plugins called "modules". These can
be added to the grid through the grid's "module" property which is an array of modules.
Each entry in the array is the class for the module that has been loaded. If we wish, we can provide
parameters to the module by adding a list entry which is an object of the form:
{
moduleClass: <class>,
<parameter>: value
}
gridx/modules/Bar
This module provides support for top and bottom bars. When added to a grid, two new grid level
properties become available. These properties are called "barTop" and "barBottom". Each
property is an array and controls that appears in the top bar and bottom bar. We can loosely think
of barTop and barBottom as adding a <tr> table row into the HTML. Each element in the
barTop and barBottom array can also be thought of as adding a local column (<td>). If the
elements in the array are themselves arrays then we will have multiple rows.
An element can also be an arbitrary Dijit widget.
Here are some examples
barTop:
[
refreshButton, // (an instance of a dijit/form/Button)
SupportSummary, // The class gridx/support/Summary
{
pluginClass: SupportLinkSizer,
style: "text-align: right;"
},
{
content: "Hello World",
style: "color: red;"
}
]
See also:
How to add bars to gridx?
gridx/modules/CellWidget
The CellWidget module allows a Cell to contain a Dojo Widget (Dijit). The decorator may
return HTML which is parsed by the Dijit parser to create the widget. For example
decorator: function(){
return [
'<span data-dojo-type="dijit.form.CheckBox" ',
'data-dojo-attach-point="cb" ',
'data-dojo-props="readOnly: true"',
'></span>'
].join('');
},
would create a checkbox widget. Make sure that you also set the property widgetsInCell to be
true. To set a value within the widget, the column descriptor has a method called
setCellValue(gridData, storeData, widget) added to it. When this function is
Page 181
Vista de página 180
1 2 ... 176 177 178 179 180 181 182 183 184 185 186 ... 297 298

Comentários a estes Manuais

Sem comentários