Hi, I want to make a DropDownList with the dataSource from UrlAdaptor. I start using JS2, and I do not know if it is configured the same as JS1
I have my code here:
@(Html.EJS().DropDownList("Album")
.DataSource(ds=>
{
ds.Url("/JS2/Albums").Adaptor("UrlAdaptor");
})
.Fields(new Syncfusion.EJ2.DropDowns.DropDownListFieldSettings
{
Text="Titulo", Value="AlbumId"
})
.Placeholder("Hola")
.PopupHeight("200px")
.Render()
)
public ActionResult Albums()
{
var result = read.GetAlbums();
var count = result.Count;
return Json(new { result = result, count = count }, JsonRequestBehavior.AllowGet);
}
I have two other questions
a) When configuring JS2 and adding the namespaces of Syncfusion.EJ2 in web.config (following the instructions in the documentation), when I try to use a control I can because I get a message saying that I am missing a reference and I always have to put at the start of my .cshtml @using Syncfusion.EJ2
Why is this happening?
b)If in my MVC project I have areas, how can I be able to in ds.Url ("/ JS2 / Albums") to add an area? Or is it not necessary to add the area?
Thanks in advance