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
375
Getting several values from the igCombo to insert in a igGrid
posted

Hello everybody!

 

I succeed to insert the selected value of a combo, in a column of the igGrid.

Then, I want to insert several values at the same time (in one column of one row). The type of object of this column is List<int> (a list of ID)

How inserting several values?

Here a part of my code:

----------------------------------------------------------------------

@(Html.Infragistics().Grid<A_Form_Model>()

    .ID("grid_FormA")

    .PrimaryKey("IdLineA")

    .RenderCheckboxes(true)

    .AutoGenerateColumns(false)

    .AutoGenerateLayouts(false)

    .RestSettings(rest =>

        rest.RestSetting()

            .Create(c => c.RestVerbSetting().Url("/api/linea").Batch(true))

            .Update(u => u.RestVerbSetting().Url("/api/linea"))

            .Remove(r => r.RestVerbSetting().Url("/api/linea"))

        )

    .Columns(column =>

    {

        column.For(x => x.IdLineA).Hidden(true);

        column.For(x => x.ReferenceAIEA).Width("80px");

        column.For(x => x.ListProducts).Width("400px");//It is here I want to add several values       

column.For(x => x.IdAddressFrenchParticipant).Width("80px").FormatterFunction("lookupAd");

    })

   

    .Features(features =>

    {

        features.Selection().Mode(SelectionMode.Cell).MultipleSelection(true);

        features.RowSelectors().EnableCheckBoxes(false).EnableRowNumbering(true);

        features.Updating().EditMode(GridEditMode.RowEditTemplate).EnableAddRow(true)

            .ColumnSettings(settings =>

            {                                      

                settings.ColumnSetting().ColumnKey("IdAddressFrenchParticipant").EditorType(ColumnEditorType.Combo)

                    .ComboEditorOptions(options => options.DataSource(ViewBag.Source).ValueKey("IdAddress").TextKey("AddressText"));

                settings.ColumnSetting().ColumnKey("ListProducts").EditorType(ColumnEditorType.Combo)

                    .ComboEditorOptions(options => options.AllowCustomValue(true).MultiSelection(ComboMultiSelection.OnWithCheckboxes).DataSource(ViewBag.Cycles).ValueKey("IdProduct").TextKey("Label"));

            });

    })

 

    .EnableHoverStyles(true)

    .Height("500px")

    .Width("100%")

    .DataSourceUrl("/api/linea")

    .LocalSchemaTransform(true)

    .DataBind()

    .Render()

    )

------------------------------------------------------

What is missing?

Regards,

F2O

Parents Reply Children
No Data