I have a grid whereas the columns are defined as:
The BuildingChangeValidationStatusType client template is defined as:
I am wanting to pass the model for each row to the client template since each row will contain its own lookup values. How can I accomplish this?
.Columns(columns =>
{
columns.Bound(b => b.Field);
columns.Bound(b => b.OldValue);
columns.Bound(b => b.NewValue);
columns.Bound(b => b.DateImported).Format("{0:dd-MMM-yyyy}");
columns.Bound(b => b.BuildingChangeValidationStatusType).ClientTemplate("#=BuildingChangeValidationStatusType.Value#").Width(250);
columns.Command(command => command.Custom("Update").Click("updateValidation"));
columns.Command(command => { command.Edit(); }).Width(172);
})
The BuildingChangeValidationStatusType client template is defined as:
@model Rep.Models.BuildingChangeValidationViewModel
@(Html.Kendo().DropDownList()
.Name("BuildingChangeValidationStatusType") // Name of the widget should be the same as the name of the property
.DataValueField("Id")
.DataTextField("Value")
.BindTo((System.Collections.IEnumerable)Model.BuildingChangeValidationStatuses)
)
I am wanting to pass the model for each row to the client template since each row will contain its own lookup values. How can I accomplish this?