Quantcast
Channel: ASP.net MVC Awesome - jQuery Ajax helpers
Viewing all articles
Browse latest Browse all 345

New Post: cascading dropdowns problem with id in javascript.

$
0
0
Hi,

Thanks to your library. I'm developing with MVC 4 and Razor. I'm using cascading dropdownlists like this :
@Html.Awe().AjaxDropdownFor(o => o.ListCategories).Url(Url.Action("GetItems","Categorie"))
            @Html.Awe().AjaxDropdownFor(o => o.ListActivites).Parent(o => o.ListCategories).Url(Url.Action("GetItems","Activite"))
It's ok, but not with this syntaxe
 @Html.Awe().AjaxDropdownFor(model => model.Rapport.id_categorie).Url(Url.Action("GetItems","Categorie"))
@Html.Awe().AjaxDropdownFor(model => model.Rapport.id_activite).Parent(model => model.Rapport.id_categorie).Url(Url.Action("GetItems","Activite"))
In javascript the id of Rapport.id_categorie is "Rapport_id_categorie" with "_" instead of "Rapport.id_categorie" with "."

I force that like this:
@Html.Awe().AjaxDropdownFor(model => model.Rapport.id_activite).Parent("Rapport_id_categorie").Url(Url.Action("GetItems","Activite"))
Have you an atoher solution ?

Thank's to your help. Sorry to my poor english.

Viewing all articles
Browse latest Browse all 345

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>