|
let grid: Grid = new Grid(
{
dataSource: orderDataSource.slice(0,5),
editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true,
mode: 'Normal', newRowPosition: 'Top' },
allowPaging: true,
pageSettings: { pageCount: 5 },
toolbar: ['Add', 'Edit', 'Delete', 'Update', 'Cancel'],
actionBegin: actionBegin,
columns: [
{
field: 'OrderID', isPrimaryKey: true, headerText: 'Order ID', textAlign:
'Right',
validationRules: { required: true, number: true }, width: 140
},
{
field: "det_valor",
headerText: 'Valor',
format: '###0.#0',
edit: { params: {validateDecimalOnType: false, format:
'###0.#0', decimals: 2
} },
editType: 'numericedit',
width: 200,
}
. . . . . . . . .
. . .
.
. . . . . . . . .
. .
}],
});
grid.appendTo('#Grid');
|