如何设置默认剑道下拉列表值

问题描述

我有“国家/地区”下拉列表,我使用kendo下拉列表从数据库显示“国家/地区”

我的国家/地区下拉列表为:

    @(Html.Kendo().DropDownListFor(p => p.CountryID)
        .BindTo(country)
        .DataTextField(@Model.CountryCode)
        .DataValueField(@Model.CountryID))
        .HtmlAttributes(new { style = "width:100%" })
        .ValuePrimitive(true)
        .Filter(FilterType.Contains)
   )

我使用依赖注入将下拉列表绑定为

       var country = (await counties.GetCountryCode("CountryID"));

我如何使美国成为认国家(ID = 1)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)