ext.net - Invalid data source source type. The data source must be of type IListSource, IEnumerable or IDataSource -
ext.net - Invalid data source source type. The data source must be of type IListSource, IEnumerable or IDataSource -
i prety new on mvc app.my problem vs gives me error this. "invalid info source source type. info source must of type ilistsource, ienumerable or idatasource."
**what wanna in senario using sample making pagination entitiy. here view
@( html.x().panel() .id("imagepanel") .cls("images-view") .frame(true) .width(535) .collapsible(true) .title("urunler") .items( html.x().dataview() .id("imageview") .store( html.x().store() .remotepaging(true) .autoload(false) .id("store1") .pagesize(5) .datasource(model) .model( html.x().model() .idproperty("id") .fields( html.x().modelfield().name("ad"), html.x().modelfield().name("aciklama") ) ) .proxy(html.x().ajaxproxy() .url(url.action("read")) .reader(html.x().jsonreader().root("data").totalproperty("data.totalrecords")) ) ) .emptytext("") .trackover(true) .tpl( html.x().xtemplate() .html( @<text> <tpl for="."> <div class="thumb-wrap" id="{ad}"> <div class="thumb"><img src="{ad}" title="{ad}"></div> <span class="x-editable">{aciklama}</span> </div> </tpl> <div class="x-clear"></div> </text> ) ) ) .bottombar( html.x().pagingtoolbar().storeid("store1").hiderefresh(true) ) )
and controlerr
public actionresult index() { homecoming view(); } public actionresult read(storerequestparameters parameters) { int totalrecords; int start = parameters.start; int limit = parameters.limit; string sort = "1"; homecoming this.store(plantspaging(start, limit, sort, out totalrecords)); } public paging<urun> plantspaging(int start, int limit, string sort, out int totalrecords) { urun_bll urun_bll = new urun_bll(); var info = urun_bll.getir(start, limit, sort, out totalrecords); homecoming new paging<urun>(data, totalrecords); }
since loading info via ajaxproxy , not passing model view, should remove this:
.datasource(model)
at runtime is:
.datasource(null)
and yes, throws exception, because not store's datasource expects.
ext.net
Comments
Post a Comment