Is it possible to wire up cascading igCombo boxes within igGrid? If so how do you specifiy the parentComboKey? If not is my only option to override the 'editCellStarting' event to add or clear listitems as the child dropdowns are selected?
Thanks,
Chad
Hello Chad,
Thank you for posting in our forum.
You can set the parentComboKey and parentCombo options in the editorOptions for the specific column Settings of the grid .
For example in the settings of the grid you can define the editor options as follows to set 2 cascading combos:
columnSettings: [
{
//The combo is defined as an editor provider. Combo options are defined under 'editorOptions'.
columnKey: "Country",
editorType: 'combo',
required: true,
editorOptions: {
mode: "dropdown",
id: "contryCombo",
dataSource: dsCountry,
textKey: "txtCountry",
valueKey: "valCountry"
}
},
columnKey: "District",
id: "districtCombo",
dataSource: dsCascDistrict,
textKey: "txtDistrict",
valueKey: "valDistrict",
parentComboKey: "keyCountry",
parentCombo: "contryCombo"
…
The parentCombo option should be set to the id of the parent combo.
The parentComboKey is the column key in the dataSource, which will be used by the cascading functionality in order to get records matching with the selected value in the parent igCombo.
I’ve attached an example for your reference. Let me know if you’re aiming to achieve something similar.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://ko.infragistics.com/support
Where is the selection changed event in the code?