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
195
igCombo Not Found Error
posted

When I use the combo MVC helper in my page then I get a javascript error that igcombo is not found on the same page if I put the igCombo javascript tag then it works fine. I am not sure why combo MVC helper does not work. Here is it how I am using it:

  @(Html.Infragistics().Combo()

                    .ID("FileId")

                    .Width("200 px")

                    .MultiSelectionSettings(ms =>

                    {

                        ms.Enabled(true);

                        ms.ShowCheckBoxes(true);

                    })

                    .ValueKey("FileId")

                    .TextKey("Name")

                    .DataSourceUrl(Url.Action("scripts-combo-data"))

                    .DataBind()

                    .Render()

                )

Now the code that works is the following:

   $("#checkboxSelectCombo").igCombo({

            width: "270px",

            dataSource: colors,

            textKey: "Name",

            valueKey: "Name",

            multiSelection: {

                enabled: true,

                showCheckboxes: true

            }

        });