I have two drop down lists
<td width="75%">
@(Html.Kendo().DropDownList()
.Name("ddlGrade")
.HtmlAttributes(new { style = "width: 250px", @class = "editor-dropdownlist" })
.OptionLabel("Select Grade...")
.DataSource(
dataSource =>
{
dataSource.Read(read => read.Action("ListAttributesBySystemID", "CatalogAttributeType", new { systemID = 16 }));
dataSource.Events(events => events.Change("gradeDataSourceChange"));
}
)
.DataTextField("Title")
.DataValueField("ID")
.Events(events => { events.Change("saveGradeAttribute"); })
)
</td>
and
@(Html.Kendo().DropDownList()
.Name("ddlCoinFinish")
.HtmlAttributes(new { @class = "editor-dropdownlist" })
.OptionLabel("Select...")
.DataSource(dataSource =>
{
dataSource.Read(read => read.Action("ListAttributesBySystemID", "CatalogAttributeType", new { systemID = 46 }));
dataSource.Events(events => events.Change("ddlCoinFinishDataSourceChange"));
}
)
.DataTextField("Title")
.DataValueField("ID")
.Events(events => { events.Change("ddlCoinFinishChange"); })
)
</td>
with value populating from the database
I want to change the value of the CoinFinish drop down list when changing the grade drop down list.
I have created this java script code
$("#ddlGrade").change(function () {
if (value == 2279) {
$('#ddlCoinFinish').val(4393).attr("selected", "selected").change();
alert("You have Selectedddddd :: " + $("#ddlGrade").val());
alert("You have ddlCoinFinish :: " + $("#ddlCoinFinish").val());
}
});
And the second alert box showing the changed (New) value. But there is no change in the UI of the CoinFinish Ddl. Can you please help me.
Thanks In advance.