2

我有这个剑道 UI 多选:

@(Html.Kendo().MultiSelect()
      .Name("EditModel.Modules.ID")
      .DataValueField("ID")
      .DataTextField("Name")
      .Filter(FilterType.Contains)
      .DataSource(source =>
      {
        source.Read(read =>
                    {
                    read.Action("GetModules", "Modules");
                    })
                   .ServerFiltering(true);
                    }))

如何将 [ index ] 添加到 name 以便数组映射到我的 editmodel 中的数组?

4

1 回答 1

2

你可以尝试使用

@(Html.Kendo().MultiSelectFor(model => model.Property))

在这种情况下,您不能使用 Name() (它将自动设置为正确的值),这一点很重要。

于 2013-10-11T13:17:50.667 回答