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
2565
igGrid ColumnEditorType Combo changed event
posted

We have an igGrid with a column that is of type ColumnEditorType.Combo. We need to tie an event to the combo so that when it changes we can update another column in the grid. The editorValidatorOptions have an onChange property. How do you hook that up to an event? Is that even the right way to configure this? Any samples you could provide would be helpful.

Parents
No Data
Reply
  • 17150
    Verified Answer
    Offline posted

    Hello Tammy,

    Thank you for posting in our community.

    Events for the igCombo editor could be hooked in the editorOptions. All events that are applicable for the igCombo (which could be found here) could be attached for the editor provider as well.  For example the SelectionChanged event could be achieved as following:

      $("#gridManageView").igGrid({

    .

    .

      features: [

    {
           name: "Updating",
           enableAddRow: true,
           enableDeleteRow: true,
           columnSettings: [
              {
                    columnKey: "viewType", editorType: "combo", required: true,
                     editorOptions: {
                        mode: "dropdown",
                        textKey: "Text",
                        valueKey: "Value",
                        dataSource: viewOptions,
                        dataSourceType: "json",
                        width: "100%",
                        autoComplete: false,
                        filteringType: "local",
                        renderMatchItems: "contains",
                        enableClearButton: true,
                        mode: "editable",
                        selectionChanged: function (e, args) {
                           //handle your event here
                            alert("Event Fired!");
                        }
                }
         },
                                               
      ]

    }

    ]

    });

    I am also attaching a small sample illustrating my suggestion for your reference.

    Please have a look at the provided sample and let mw know if you have any additional questions afterwards.

    igGridComboEditorSelectionChangedEvent.zip
Children