Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143701 | Apr 1,2019 02:17 PM UTC | Apr 5,2019 07:15 AM UTC | JavaScript - EJ 2 | 5 |
![]() |
Tags: Grid |
var grid = new ej.grids.Grid({
dataSource: window.orderDataSource,
editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, mode: 'Normal', newRowPosition:'Top' },
allowPaging: true,
pageSettings: { pageCount: 5 },
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,minLength:[checkMaxHours,'Este campo es obligatorio']}, width: 100
},
. . .
],
});
grid.appendTo('#Grid');
function checkMaxHours(args){
var row = grid.getRowObjectFromUID(ej.base.closest(args.element, '.e-row').getAttribute('data-uid'));
console.log(row.data);
return true;
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.