javascript - ListView data showing undefined in KendoUI -


html code.. working learning purpose, therefore used sample code

<script type="text/x-kendo-tmpl" id="template">     <div class="product-view k-widget">         <dl>             <dt>  title  </dt>             <dd>  #:title#   </dd>             <dt>  deetail  </dt>             <dd>  #:deetail#   </dd>         </dl>     </div> </script>  

parametermap:

else if (operation !== "read" && options.models) {                                             return { models: kendo.stringify(options.models) }; 

javascript:

var listview = $("#listview").kendolistview({     datasource: datasource,     template: kendo.template($("#template").html()),     edittemplate: kendo.template($("#edittemplate").html()) }).data("kendolistview");` 

api call:

read: {     type: "get",     url: "xyz"+value,     datatype: "json",     cache: false }, 

controller code:

public ihttpactionresult getspecificationdetail(int id) {     type type= new type();     list<type> spdetails = db.type.where(i => i.typeid == id).tolist();     if (spdetails == null)     {         return notfound();     }     return ok(spdetails); } 

as result getting data first row rest rows shows "unidentified"

i got answer

var spdetails = db.typedetails.where(i => i.typeid == id).select(s=> new typedetailsview{ typeid=s.typeid,details=s.typedetails,typetitle=s.typetitle}).tolist();


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -