Setting Content for Bound Kendo UI MVC TabStrip using Razor -


having trouble setting tab content databound tabstrip. found example of how to using webforms syntax, can't convert razor:

here webforms syntax from here:

 .bindto(model, (item, navigationdata) => {     item.text = navigationdata.text;     item.imageurl = navigationdata.imageurl;      item.content = () =>     {%>                         random content want appear                 <% }; }) 

here how trying in razor:

@(html.kendo().tabstrip()     .name("orderdetailstabs")     .bindto(model, (item, model) =>     {         item.text = "part: " + model.wohdr.orderdetailid; // tab text         item.content = () =>             {                 (@<text>                     test @(model.wohdr.id)                 </text>);             }; 

which produces error:

a local variable named 'item' cannot declared in scope because give different meaning 'item', used in 'parent or current' scope denote else 

you have use .inlinetemplate...not .content

tab.template.inlinetemplate =          @<text>              @(html.editorfor(model => tabmodel, "workorder", tabmodel))         </text>; 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -