Hello,
I have a shared datasource that returns a model that has four lists
Model:
public class BillModel : DocumentBaseModel
{
...
public List<HistoryModel> History { get; set; }
public List<AmendmentModel> Amendments { get; set; }
public List<OtherDocModel> OtherDocs { get; set; }
public List<PreviousVersionModel> PreviousVersions { get; set; }
}
Shared Datasource:
@(Html.Kendo().DataSource<BillModel>()
.Name("myDataSource")
.Custom(dataSource =>
{
dataSource
.Type("json")
.Transport(transport =>
{
transport.Read(read =>
{
read.Action("GetBill", "Bills", new { billNo = "#=Id#" });
});
});
})
)
And one of my DDLs:
@(Html.Kendo().DropDownList()
.Name("amendments")
.DataTextField("Name")
.DataValueField("LFID")
.DataSource("myDataSource")
.HtmlAttributes(new { style = "width: 100%" })
.ToClientTemplate()
)