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
645
problem editor combo
posted

Hi,

I am work to iggrid. i want create a column whit editor as combo.

I add references js: jquery.ui.core.js, jquery.ui.widget.js, infragistics.util.js, infragistics.ui.editor.js, infragistics.ui.combo.js and infragistics.loader.js.

My code:

@(Html.Infragistics().Grid(Model.tabla.Registros.AsQueryable).ID("TablaParametrizacion").PrimaryKey("Codigo") _
.UpdateUrl(Url.Action("BorrarElemento")) _
.AutoGenerateColumns(False) _
.Columns(Sub(column)
column.For((Function(x) x.Codigo)).HeaderText(Resources.MultiIdioma.ValorOiginal).Width("auto")
column.For((Function(x) x.Pais)).HeaderText("pais").DataType("string").Width("auto")
column.For((Function(x) x.Valor)).HeaderText(Resources.MultiIdioma.Banco).Width("auto")
End Sub) _
.Features(Sub(features2)
features2.Resizing()
features2.Selection.Mode(SelectionMode.Row).MultipleSelection(True)
features2.Updating().EnableDeleteRow(True) _
.EnableAddRow(True).EditMode(GridEditMode.Row) _
.ColumnSettings(Sub(setting)
setting.ColumnSetting.ColumnKey("Codigo") _
.EditorOptions(ColumnEditorType.Text).TextEditorOptions(Sub(opciones)
opciones.MaxLength(35)
End Sub)
setting.ColumnSetting.ColumnKey("Pais") _
.EditorOptions(ColumnEditorType.combo).ComboEditorOptions(Sub(opciones)
opciones.DataSource(valor)
End Sub)
setting.ColumnSetting.ColumnKey("Valor") _
.EditorOptions(ColumnEditorType.Text).TextEditorOptions(Sub(opciones)
opciones.MaxLength(35)
End Sub)

End Sub)
End Sub) _
.Height("90%").DataBind().Render())

I don`t see combo editor to column pais... datasource to combo have dates...

Thanks in advanced

Best Regards,

Elena

  • 645
    Verified Answer
    posted

    Hi,

    I resolved problem. I add refrences to core and combo, and change de options to combo:

    setting.ColumnSetting.ColumnKey("Pais") _
    .EditorType(ColumnEditorType.combo).ComboEditorOptions(Sub(opciones)
    opciones.DataSource(Model.TablaBic.Paises)
    End Sub)

    Best Reguards

    Elena