On my page, I have an igGrid configured with editMode : 'dialog'.
The grid has a company column which will be edited with a combo editor.The names for the combo came from a separate JSON list which contains company-name and company-id. for each entry.
The editor options of the combo column look like:
editorOptions: { mode: "dropdown", //dataSource: ds_companies, dataSource: companies, textKey: "company_name", valueKey: "company_name" }
When I try to store the changed company value, I need the company-id of the selected value from the combo box.
Is there a possibility to bind the id to the value, without showing the id in the edit dialog?
regards
Karl-Heinz
Hello Karl-Heinz,
After investigating this further, I determined that your requirement could be achieved by accessing the id of the selected item in a method bound to the selectionChanged event.
editorOptions: {
mode: "dropdown",
dataSource: companies,
textKey: "Name",
valueKey: "Name",
selectionChanged: function (evt, ui) {
comboItemID = ui.items[0].data.ID;
console.log(comboItemID);
}
Please let me know if you need any further information regarding this matter.
Regards,
Monika Kirkova,
Infragistics
Hi Monika,
thanks for your answer...
It works quit perfect
I am glad that you find my suggestion helpful and were able to solve your issue.
Thank you for using Infragistics components.