asp.net mvc - the client detail template in kendo UI is not working -


i have kendo grid in asp .net mvc application. im following demos on kendoui website build detail template on grid. couldnt make work. here's code.

@(html.kendo().grid<kendouimvcapplication2.models.getcalldetailresult>() .name("grid") .columns(columns =>     {         columns.bound(p => p.contactcommunicationcallid).title("cccid").width("20");         columns.bound(p => p.localstartdatetime).title("date time").format("{0:m/d/yyyy}");         columns.bound(p => p.lpemployeecode).title("employee code").width("50");         columns.bound(p => p.adsource).title("ad source");         columns.bound(p => p.status);         columns.bound(p => p.duration).title("duration");         columns.bound(p => p.trackingphonenumber).title("tracking number");         columns.bound(p => p.callernumber).title("caller number");         columns.bound(p => p.regionname).title("region name");         columns.bound(p => p.districtname).title("district name");         columns.bound(p => p.campaignname).title("campaign name");         columns.bound(p => p.adsourcecategoryname).title("ad source category");      }) .pageable(page => page.enabled(true).pagesizes(new int32[] { 5, 10, 20, 40 })) .sortable() .htmlattributes(new { style = "height: 700px" }) .scrollable() .clientdetailtemplateid("template") .datasource(datasource => datasource     .ajax()     .pagesize(5)     .read(read => read.action("calldetail", "home")) ) .events(ev => ev.databound("databound")) 

)

<script> function databound() {     this.expandrow(this.tbody.find("tr.k-master-row").first()); } </script>  <script id="template" type="text/kendo-tmpl">   @(html.kendo().tabstrip()         .name("tabstrip_#=contactcommunicationcallid#")         .selectedindex(0)         .animation(animation => animation.open(open => open.fade(fadedirection.in)))         .items(items =>         {             items.add().text("details").content(@<text>                 @(html.kendo().grid<kendouimvcapplication2.models.getcalldetailresult>()                     .name("grid_#=contactcommunicationcallid#")                     .columns(columns =>                     {                         columns.bound(p => p.contactcommunicationcallid).title("id").width(56);                         columns.bound(p => p.sitename).width(110);                         columns.bound(p => p.lpfirstname);                         columns.bound(p => p.lplastname).width(190);                     })                     .datasource(datasource => datasource                         .ajax()                         .pagesize(5)                         .read(read => read.action("reportlist", "home", new { cccid = "#=contactcommunicationcallid#" }))                     )                     .pageable()                     .sortable()                     .toclienttemplate()                  )             </text>                                     );             items.add().text("contact information").content(                 "<div class='employee-details'>" +                     "<ul>" +                         "<li><label>country:</label>#= contactcommunicationcallid #</li>" +                         "<li><label>city:</label>#= sitename #</li>" +                         "<li><label>address:</label>#= lpfirstname #</li>" +                         "<li><label>home phone:</label>#= lplastname #</li>" +                     "</ul>" +                 "</div>"             );                         })         .toclienttemplate()) </script>  <script> function databound() {     this.expandrow(this.tbody.find("tr.k-master-row").first()); } </script> 

controller action methods:

    public actionresult calldetail([datasourcerequest] datasourcerequest request)     {         var readcalldetails = new datadatacontext().getcalldetail(1, 762, 1).tolist();         var result = readcalldetails.todatasourceresult(request);         return json(result);      }      public actionresult reportlist(int cccid, [datasourcerequest] datasourcerequest request)     {         var readreportlist = new datadatacontext().getcalldetail(1, 762, 1).tolist().where(cd => cd.contactcommunicationcallid == cccid);         var result = readreportlist.todatasourceresult(request);         return json(result);             //.where(cd => cd.contactcommunicationcallid == cccid)     } 

actually, found out trial , error thing need remove web.config targetframework="xx" portion httpruntime - can keep encodertype portion!


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -