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
315
MVC Helper renders removed placeholder settings
posted

I'm using Ignite 2018.1 with the included MVC5 helper dll (Assembly Infragistics.Web.Mvc, Version=5.18.1.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb)

This Razor code:

@(Html.DefaultComboUnbound("ddlAllChangeTypes", "AllChangeTypes", "Key", "Value", Model.ChangeTypeDescriptions.ToList(), null)
    .PlaceHolder("Select to apply to all")
    .AddOrAppendClientEvent(ComboClientEvents.SelectionChanged, Html.IgEventHandler("ddlAllChangeTypesSelectionChanged"))
    .DataBind()
    .Render()
 )

Renders to this javascript function:

$(function() {
    $('#ddlAllChangeTypes').igCombo({
        filterExprUrlKey: 'filter',
        compactData: true,
        placeHolder: 'Select to apply to all',
        enableClearButton: false,
        allowCustomValue: false,
        dropDownOnFocus: true,
        width: '100%',
        valueKey: 'Key',
        textKey: 'Value',
        inputName: 'AllChangeTypes',
        loadOnDemandSettings: {
            enabled: false
        },
        dataSource: [{
            "Key": 0,
            "Value": "Soft change"
        }, {
            "Key": 1,
            "Value": "Hard change"
        }],
        selectionChanged: function(evt, ui) {
            ts1599461760.ddlAllChangeTypesSelectionChanged(evt, ui)
        }
    });
});

As noted in the documentation for igCombo the placeholder setting it generated is incorrect and does not work anymore.
https://www.igniteui.com/help/api/2018.1/ui.igcombo