Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Rendering UpdateDialog with igCombo
posted

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

Parents
  • 1320
    Verified Answer
    Offline posted

    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

Reply Children
No Data