Hi,
I have a cascading dropdownlist, and if the Item count for the dropdown getting populated is 1 I want to keep the item it default selected instead of showing OptionLabel and the item. Or else remove the Option label in that case. below of the my dropdown which gets populated on change of dropdown 'DeliveryDestinationID'. How do i do this.
@(Html.Kendo().DropDownList()
.Name("DeliveryNameID")
.HtmlAttributes(new { style = "width:235px" })
.OptionLabel("Select Delivery Name...")
.DataTextField("Text")
.DataValueField("Value")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetDeliveryNames", "DeliveryQueue")
.Data("filterAsPerServiceProvider");
})
.ServerFiltering(true);
})
.Enable(false)
.AutoBind(false)
.CascadeFrom("DeliveryDestinationID")
)
I have a cascading dropdownlist, and if the Item count for the dropdown getting populated is 1 I want to keep the item it default selected instead of showing OptionLabel and the item. Or else remove the Option label in that case. below of the my dropdown which gets populated on change of dropdown 'DeliveryDestinationID'. How do i do this.
@(Html.Kendo().DropDownList()
.Name("DeliveryNameID")
.HtmlAttributes(new { style = "width:235px" })
.OptionLabel("Select Delivery Name...")
.DataTextField("Text")
.DataValueField("Value")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetDeliveryNames", "DeliveryQueue")
.Data("filterAsPerServiceProvider");
})
.ServerFiltering(true);
})
.Enable(false)
.AutoBind(false)
.CascadeFrom("DeliveryDestinationID")
)