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
190
How to have editors in angular 2 grid?
posted

Hi,

I am using quick start for ignite ui grid on github. I am connecting to a Web API to fetch the data. I am successful in doing it. Can I know how can I implement combo editor in angular 2 for updating the grid columns?

Regards

Rahul S

  • 0
    Offline posted

    The editor type can be set to “combo” via the editorType option. Additional combo specific options can be set via the editorOptions option.

    Spanish dictionary

  • 29417
    Offline posted

    Hello Rahul,

     Thank you for posting in our forum.

    You can set the Updating feature’s column settings and specify the editor type for the column you wish to use a combo for:

    https://www.igniteui.com/help/api/2017.1/ui.iggridupdating#options:columnSettings

     

    The editor type can be set to “combo” via the editorType option. Additional combo specific options can be set via the editorOptions option.

    https://www.igniteui.com/help/api/2017.1/ui.iggridupdating#options:columnSettings.editorType

    https://www.igniteui.com/help/api/2017.1/ui.iggridupdating#options:columnSettings.editorOptions

     

    Here’s an example on how the column settings can be set via angular syntax:

    <features>

    <updating [columnSettings]=”columnSettingsOption”></updating>

    </features>

     

    Where columnSettingsOption would be the property in your component that contains the column setting.Example:

     

    this.columnSettingsOption = [{

                                columnKey: "CategoryID",

                                editorType: 'combo',

                                required: true,

                                editorOptions: {

                                    mode: "dropdown",

                                    dataSource: northWindCategoriesJSON,

                                    textKey: "Name",

                                    valueKey: "ID"

                                }

                            }];

     

     

    Let me know if you have any additional questions or concerns.

     

    Best Regards,

    Maya Kirova

    Infragistics, Inc.

    http://es.infragistics.com/support