|
Index.js
ej.base.enableRipple(true);
ej.base.L10n.load({
es:
{
grid: {
…..……
Add: 'Añadir',
Edit: 'Editar',
Cancel: 'Cancelar',
Update: 'Actualizar',
Delete: 'Eliminar',
………….
},
},
});
var grid = new ej.grids.Grid({
dataSource: window.orderDatas,
allowPaging: true,
allowEditing: true,
editSettings: {
allowEditing: true,
allowAdding: true,
allowDeleting: true,
mode: 'Normal',
},
locale:
'es',
toolbar: ['Add', 'Edit', 'Delete', 'Update',
'Cancel'],
columns: [
{
field: 'OrderID',
isPrimaryKey: true,
headerText: 'Order ID',
textAlign: 'Right',
validationRules: {
required: true, number: true },
width: 140,
},
{
field: 'CustomerID',
headerText: 'Customer ID',
validationRules: {
required: true },
width: 140,
},
{
field: 'Freight',
headerText: 'Freight',
textAlign: 'Right',
editType: 'numericedit',
width: 140,
format: 'C2',
validationRules: {
required: true },
},
{
field: 'OrderDate',
headerText: 'Order Date',
editType:
'datetimepickeredit',
format: { type: 'dateTime',
format: 'M/d/y hh:mm a' },
width: 160,
},
{
field: 'ShipCountry',
headerText: 'Ship Country',
editType: 'dropdownedit',
width: 150,
edit: { params: {
popupHeight: '300px' } },
},
],
});
grid.appendTo('#Grid');
|