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.
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:
[code]
$("#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!"); } } }, ]
}
]
});
[/code]
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.
Hello Tammy, I am using the SelectionChanged Event. How do I access the other fields in the grid from this event. I would like to change another fields value based on the combobox selected value. Thanks.