Hello,
I need help for the following issue:
this is the dropdown list -
@Html.Kendo().DropDownListFor(m => m.PoLine[nr].ActivityId).DataTextField("Value").DataValueField("Key").DataSource(source =>
{
source.Read(read =>
{
read.Action(@MVC.Budget.Budget.ActionNames.GetActivity, MVC.Budget.Name)
.Type(HttpVerbs.Post)
.Data("function () { return filterSubCategory('" + categoryId.Replace("\\", "\\\\") + "','" + subCategoryId.Replace("\\", "\\\\") + "'," + @current.ActivityId + "," + @nr + "); }");
})
.ServerFiltering(true);
}).Enable(true).AutoBind(false).CascadeFrom(subCategoryId).Events(ev => { ev.Change("function(e){ var item = this.dataItem(); return true; return onchangeDivFromItemText(item,'" + string.Format(idReplace, "activity") + "')}"); }).HtmlAttributes(new { @class = "combo_date", style = "width:170px;" })
and this is the field where I want to be updated -
@Html.UbiLabelValues(Model.RefMarketList.Where(item => item.Key.HasValue && item.Key.Value == Model.PoLine[nr].MarketId).FirstOrDefault().Value, LabelFor: "MarketName", className: "MarketName")
where UbiLabelValues returns -
string s = "<label for='{1}' {1} >{0}</label>";
s = string.Format(s, text, LabelFor, className);
return new MvcHtmlString(s);
I want to know how to change ev.Change of dropdown in order to referentiate the field with the new value selcted from dropdown.