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
185
comboeditor not shown on igGrid when using infragistics.loader.js
posted

Hello.

I´m using Infragistics.Web.Mvc version 3.12.1.2023

My references 

<script src="@Url.Content("~/Scripts/IG/infragistics.loader.js")" type="text/javascript"></script>

I have troubles when the user try to edit a row, specifically when they try to edit options in the comboeditor. The comboeditor never shows.

and I can see in Firebug  the message: 'In order to use the combo type for ui.igGrid, the ui.igCombo should be loaded'

I´m loading resources in this way:

@(Html.Infragistics().Loader()
.ScriptPath(Url.Content("~/Scripts/IG/"))
.CssPath(Url.Content("~/Content/css/"))
.Render()
)

@( Html.Infragistics().Grid<BoletaDetalleView>()
.ID("igGridDetalle")
.Columns(column =>
{
column.For(x => x.ID).DataType("int").HeaderText("ID").Hidden(true);
column.For(x => x.ApellidoNombre).DataType("string").HeaderText("Apellido Nombre").Width("50%");
column.For(x => x.CUIL).DataType("int").HeaderText("CUIL").Width("20%");
column.For(x => x.MotivoBajaDescripcion).HeaderText("Motivo Baja").Width("20%");
column.For(x => x.Remuneracion).DataType("number").HeaderText("Remuneracion").Width("10%");
column.For(x => x.AfiliadoId).DataType("int").Hidden(true);
column.For(x => x.PersonalId).DataType("int").Hidden(true);
column.For(x => x.BoletaId).DataType("int").Hidden(true);
column.For(x => x.MotivoBajaId).DataType("int").Hidden(true);

})
.Features(features =>
{
features.Sorting().Mode(SortingMode.Single).ColumnSettings(settings =>
{
settings.ColumnSetting().ColumnKey("ID").AllowSorting(true);

});
features.Selection().MouseDragSelect(true).MultipleSelection(false).Mode(SelectionMode.Row);
features.Updating().ColumnSettings(settings =>
{
settings.ColumnSetting()

.ColumnKey("MotivoBajaDescripcion")
.Required(false)
.EditorType(ColumnEditorType.Combo)

.ComboEditorOptions(options =>
{
options.TextKey("Descripcion");
options.ValueKey("ID");
options.DataSource(ViewBag.MotivosBaja);
options.DropDownMinHeight(200);
});
});

})

.ClientDataSourceType(ClientDataSourceType.JSON)
.DataSource(new List<BoletaDetalleView>().AsQueryable())
.Width("100%")
.LocalSchemaTransform(true)
.AutoCommit(true)
.DataBind()
.Render()
)

Thanks in advance

Parents
  • 23953
    Verified Answer
    Offline posted

    Hi,

    igCombo is not loaded automatically by igGridUpdating, so you should reference it manually.

    Your loader initialization code should look like this one:

     

    Code Snippet
    1. @(Html.Infragistics().Loader()
    2. .ScriptPath(Url.Content("~/Scripts/IG/"))
    3. .CssPath(Url.Content("~/Content/css/"))
    4. .Resources("igCombo")
    5. .Render()
    6. )

     

     

    Best regards,

    Martin Pavlov

    Infragistics, Inc.

Reply Children
No Data