Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
530
Ignite ui combobox with mvc 4.0 helpers load from database error
posted

i am trying to use a ignite ui componet called combobox , and i was trying to follow this tutorial on the igniteui page.

heres is the link:
<http://www.igniteui.com/combo/aspnet-mvc-helper>

the tutorial uses a repository factory, and i am using entity framework model with linq.
i already use some of the components of ignite ui, like igGrid, and i followed the tutorial on this video

<http://es.infragistics.com/products/jquery/grid/videos/iggrid-entity-framework-model>
to make the grid bind with ef model.

I am having problems with the binding of the data to the combobox,i wqas trying to follow the same approach to the bing of iggrid, but i am having some problems..

in my view i have got this..

@(Html.Infragistics().ComboFor(item=>item.IDCliente)

.Width("270px")
.DataSourceUrl(Url.Action("employee-combo-data"))
.ValueKey("ID")
.TextKey("Name")
.DataBind()
.Render()
)

in the controller i have this:

[ComboDataSourceAction]
[ActionName("cliente-combo-data")]
public ActionResult ComboData()
{
return View(LicenciamentoMVC.Models.ClienteModel.GetListaClientes());
}

and in my cliente class i have this:

public class ClienteModel
{
private static Cliente entity;
public static IQueryable<Cliente> GetListaClientes()
{
MvcApplication1Context db = new MvcApplication1Context();

var customers = from c in db.Clientes
orderby c.IDCliente descending
where c.Rem==0
select c;

return customers.AsQueryable<Cliente>();
}
the **error** that is giving me is:
**System.Collections.Generic.IEnumerable<'LicenciamentoMVC.Models.Cliente'> does not contain any definition for 'IDCliente'.**

What changes do i need to do, or the best way to go is instead of using entity model go for repository...
thanks in advance..

Parents Reply Children
No Data