Kendo Window不会从模型中加载数据

时间:2016-07-22 08:25:55

标签: user-interface view kendo-ui window loading

@model Example.Model1ViewModel

@if (Model != null && Model.TableSix != null)
{
<table>
    <thead>
        <tr>
            <td style="width:60%"></td>
            <td style="width:20%">Outstanding Amount</td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Total</td>
            <td class="Total cursor">@Html.DisplayFor(x => x.TableSix.Total)</td>
        </tr>
        <tr>
            <td>One</td>
            <td>@Html.DisplayFor(x => x.TableSix.One)</td>
        </tr>
        <tr>
            <td>Two</td>
            <td>@Html.DisplayFor(x => x.TableSix.Two)</td>
        </tr>
     </tbody>
</table>
}

<div style="display: none">
@(Html.Kendo().Window()
 .Name("RemainingAssetsDrillDown")
 .Modal(true)
 .Title("Item Drill Down")
 .Actions(actions => actions.Close())
 .Content(@<text>
      <div>
        <table>
         <tbody>
          <tr>
            <td>One</td>
            <td>@Html.DisplayFor(x => x.TableSix.One)</td>
          </tr>
         </tbody>
        </table>
      </div>
    </text>)
</div>

)          $(&#34; .Total&#34;)。click(function(){     $(&#34;#MVC&#34;)。加载(&#39; @ Url.Action(&#34; PartList&#34;,&#34;报告&#34;)&#39;);     var win = $(&#34;#DrillDown&#34;)。data(&#34; kendoWindow&#34;);     win.center()打开();      });     

<style type="text/css">
.cursor {
cursor: pointer;
}
</style>

所以,问题是@Html.DisplayFor(x =&gt; x.TableSix.One)从第一个表中的视图模型中获取正确的值,但是在kendo窗口下的表中我得到的值为0

我知道如何获取@ Html.DisplayFor(x =&gt; x.TableSix.One)以将视图模型中的值显示到kendo窗口下的表中?

提前致谢。 :)

0 个答案:

没有答案