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
285
igCombo cascade within igGrid?
posted

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

Parents
  • 29417
    Verified Answer
    Offline posted

    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"

                                }

                            },

                                                                                                    {

                                //The combo is defined as an editor provider. Combo options are defined under 'editorOptions'.

                                columnKey: "District",

                                editorType: 'combo',

                                required: true,

                                editorOptions: {

                                      id: "districtCombo",

                                    mode: "dropdown",

                                    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

     

    grid_editors.zip
Reply Children