2

Kendo UI 的 Window contorl 的 Content 和 LoadContentFrom 属性有什么不同。我在主页上有两个按钮。每个按钮都有单独的窗口控件来调用相应的局部视图。如果我使用内容方法,则最初加载客户索引,即在页面加载时。如果我使用 LoadContentFrom,则在窗口可见时加载 DOM 控件。

例如,

@(Html.Kendo().Window()
    .Name("CustomerWindow")
    .Title("Customer")
    .Content(@<text>
@Html.Partial("../Customer/Index")
</text>)
    .Draggable()
    .Resizable()
    .Width(736)
    .Visible(false)
)

@(Html.Kendo().Window()
    .Name("CustomerWindow")
    .Title("Customer")       
        .LoadContentFrom("../Customer/Index")
    .Draggable()
    .Resizable()
    .Width(736)
    .Visible(false)
    .Modal(true)
)

我认为它的延迟加载概念,但我不知道确切的区别。

谢谢桑托什

4

1 回答 1

2

LoadContentFrom设置指定窗口将使用 Ajax 请求加载的 URL。Content定义窗口的静态 HTML 内容。

于 2012-09-03T19:41:27.400 回答