I have a Kendo DropdownList as follows:
<div id="dropDownList" class="col-xs-6">
@(Html.Kendo().DropDownListFor(m => m)
.Name("DealerBoothDropDown")
.DataTextField("DropDownText")
.DataValueField("BoothDetailRowId")
.OptionLabel("Select Dealer and Booth...")
.AutoBind(false)
.Filter("contains")
.HtmlAttributes(new { style = "width:500px" })
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetDealersBoothsForDropDown", "DealerAccounting");
})
.ServerFiltering(true); // Let's do server side filtering
})
.Events(e => {
e.Select("onSelect");
})
)
</div>
When the page loads, I would like to execute some JS that sets a default value in the Dropdown. Can you show me how I might do this.