- Home
- Forum
- JavaScript - EJ 2
- Dropdownlist in Grid Edit Module
Dropdownlist in Grid Edit Module
Hi,
Attachment: Grid_DropDown_code_7b533dd8.zip
i have a DataGrid Column that in edit mode shows a dropdown. This works perfect.
The problem is when i activate Filtering. in this case the dropdown closes directly when i interacst with the list ( click or type ). And dosent show the entries.
I leave my Grid declaration that includes the edit mode, ( its the field codeProject ).
Thank you and greets.
Attachment: Grid_DropDown_code_7b533dd8.zip
SIGN IN To post a reply.
1 Reply
PS
Pavithra Subramaniyam
Syncfusion Team
March 29, 2019 10:10 AM UTC
Hi Miguel,
Greetings from Syncfusion.
Query: i have a DataGrid Column that in edit mode shows a dropdown. This works perfect. The problem is when i activate Filtering. in this case the dropdown closes directly when i interacst with the list ( click or type ). And dosent show the entries.
We have validated your query and tried to reproduce the reported problem at our end. But It works fine. We have prepared a sample based on your requirement. Please find the below code example and sample for your reference.
[code example]
|
...
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'); |
Please get back to us if you need further assistance.
Regards,
Pavithra S.
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
MV Miguel Varela Rodriguez
- Mar 28, 2019 12:43 PM UTC
- Mar 29, 2019 10:10 AM UTC