ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
how to combobox remote search cascading on itself (on current value)
Title:
B
I
{code}
?
in view: @(Html.Awe().AjaxRadioList("AllMealsCombo") .Combobox() .HtmlAttributes(new {Id = "test", onkeydown = "search(this)" }) .Url(Url.Action("GetAllMeals", "TestComboo"))) In Controller : public ActionResult GetAllMeals(int? id) { if (id == 2) { var itemms = S_Persons.Persons.Select(o => new KeyContent(o.Id, o.Name)); return Json(itemms); } var items = S_Persons.PersonDetails.Select(o => new KeyContent(o.Id, o.Name)); return Json(items); } I want the function "Cascading dropdownlist using binding to parent" to be done by one combobox. How can I do that?
Save Changes
Cancel
dear
asked at 06 Nov 2016
so you want the just one combobox to be both the parent and the child ?
at 09 Nov 2016
Omu
Yes, exactly
at 09 Nov 2016
dear
I suppose you could do this, using this demo: http://demo.aspnetawesome.com/AjaxRadioListDemo#Odropdown-with-remote-search, in the controller besides the `string term` you also get the current value, so you can add `SearchMeals(string term, string v)` `v` is current value, so every time you search you can use the search term and the current value to determine what search results to return
at 09 Nov 2016
Omu
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK