Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143599 | Mar 28,2019 12:43 PM UTC | Mar 29,2019 10:10 AM UTC | JavaScript - EJ 2 | 1 |
![]() |
Tags: Grid |
...
var dropDownData = [
{ sid: '1', sname: 'France' },
...
];
var grid = new ej.grids.Grid({
dataSource: window.orderData,
editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, mode: 'Batch' },
allowPaging: true,
pageSettings: { pageCount: 5 },
toolbar: ['Add', 'Delete', 'Update', 'Cancel'],
columns: [
...
{
field: 'ShipCountry', headerText: 'Ship Country', edit: {
create: function () {
elem = document.createElement('input');
return elem;
},
read: function () {
return dropDownObj.value;
},
destroy: function () {
dropDownObj.destroy();
},
write: function (args) {
dropDownObj = new ej.dropdowns.DropDownList({
dataSource: dropDownData,
fields: { text: 'sname', value: 'sname' },
value: args.rowData[args.column.field],
popupHeight: '230px',
allowFiltering: true,
});
dropDownObj.appendTo(elem);
}
}, width: 150
}
],
});
grid.appendTo('#Grid'); |
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.