Here's the definition of the two items that are linked by the CascadeFrom:
items.Add().Field(f => f.Country)
.ColSpan(1)
.Name("cmbCountry")
.Editor(e => e.ComboBox()
.AutoWidth(false)
.DataTextField("name")
.DataValueField("id")
.BindTo(@CountryModel.Countries)
.Placeholder("--- Select or Type Country"));
items.Add().Field(f => f.StateProvince)
.ColSpan(1)
.Name("cmbStatesProvinces")
.Editor(e => e.ComboBox()
.AutoWidth(false)
.AutoBind(false)
.Placeholder("--- Select State/Province ---")
.DataTextField("name")
.DataValueField("id")
.DataSource(dS => dS.Read(read => read.Action("GetStateList", "Address").Data("filterState")).ServerFiltering(true))
.CascadeFrom("cmbCountry")
@*.BindTo(@StatesProvinces.StateProvince)*@
);
Here's the AddressController.GetStateList:
This works for the first Country that is selected... afterwards - if the Country is changed, the GetStateList is not called again to refresh the related/CascadeFrom Combobox.