Hello,
I upgraded today to the MVC wrappers 2015.1.408 (I came from just the previous version, so really not far off).
But I encountered a breaking change I think.
I am using this dropdownlist:
@(Html.Kendo().DropDownList()
.Name("ddlExercise")
.DataTextField("Description")
.DataValueField("Id")
.OptionLabel("(Kies een oefening)")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetExercises", "Exercise")
.Data("filterExercises");
})
.ServerFiltering(true);
})
.Events(events =>
{
events.Select("ddlExercise_select");
events.DataBound("ddlExercise_databound");
})
.HtmlAttributes(new { style = "width:300px" })
.Enable(false)
.AutoBind(false)
.CascadeFrom("ddlCourseLessonGroup")
)
and in the ddlExercise_select event, I had this:
function ddlExercise_select(e) {
var dataItem = this.dataItem(e.item.index());
exerciseType = dataItem.Type;
exerciseId = dataItem.Id;
getExerciseDetailsAndInitialize();
}
However, this now raised an issue that the first item in the dropdown list (apart from the optionlabel) would never have the "dataItem" variable defined. Other elements worked without a problem, but the first one did not. If I removed the optionlabel, it worked too.
In the end, what was able to solve this was to assign the dataitem as var dataItem = this.dataItem(e.item);
So basically dropping the ".index()".
Could you please confirm this is indeed a breaking change in 2015.1.408 and that dropping the ".index()" is the correct way to resolve this ?
Thank you