autobind Telerik DropDownList有什么用?

时间:2016-11-24 23:50:50

标签: c# asp.net asp.net-mvc telerik

我的回答主题非常自我解释。 我有一个像这样的Telerik MVC DropDownList:

    @(Html.Kendo().DropDownListFor(model => model.Berater)
        .Name("Berater") //The name of the DropDownList is mandatory. It specifies the "id" attribute of the widget.
        .OptionLabel("-- Berater --")
        .DataTextField("Vorname") //Specify which property of the Product to be used by the DropDownList as a text.
        .DataValueField("Id") //Specify which property of the Product to be used by the DropDownList as a value.
        .HtmlAttributes(new { @class = "target" })
        .DataSource(source =>
        {
          source.Read(read =>
          {
            read.Action("GetUsers", "Api")
            .Data("filterProducts"); ; //Set the Action and Controller names.
          })
          .ServerFiltering(true); //If true, the DataSource will not filter the data on the client.
        })
        .Enable(false)
        .AutoBind(false)
        .CascadeFrom("Studio")
    )

我问自己,AutoBind的目的是什么?如果我将其更改为true则没有任何反应......我在文档中找不到它。

0 个答案:

没有答案