I am storing the values selected with my Cascading ComboBoxes in the local storage so it will remember what they have chosen. The problem is when the browser back button in clicked, the Cascaded combobox's Datasource is empty so when I set the value it just puts the # in the drop down instead of showing the selected item.
From what I can tell it is not calling the read method when the back button is pressed and is not cacheing the list since I am using ServerFiltering. I have even tried manually calling the read method of the datasource in JavaScript but to no avail.
How can I get this list to re-populate when the back button is used?
<
div
class
=
"col-md-6"
>
@(Html.Kendo().ComboBox()
.Name("Clients")
.DataValueField("ClientId")
.DataTextField("ClientName")
.Placeholder("Select Client...")
.Filter(FilterType.Contains)
.Events(events => events.Cascade("Clients_cascade").Change("Clients_change"))
.DataSource(ds => ds
.Read(read => read.Action("GetClients", "Home")))
)
</
div
>
<
div
class
=
"col-md-6"
>
@(Html.Kendo().ComboBox()
.Name("Projects")
.DataValueField("ProjectId")
.DataTextField("ProjectName")
.Placeholder("Select Project...")
.Filter(FilterType.Contains)
.AutoBind(false)
.CascadeFrom("Clients")
.Events(events => events.Change("Projects_change"))
.DataSource(ds => ds
.Read(read => read.Action("GetProjectsForClient", "Home").Data("FilterProjects"))
.ServerFiltering(true)
.Events(events => events.Error("Projects_error")))
)
</
div
>