Kendo Window with Grid 显示空网格
Kendo Window with Grid shows empty grid
我在 2 个具有相同网格内容(url 部分视图)的不同页面中有 2 个 kendo window。这 2 个页面也是部分页面 views.And 这 2 个视图在 tabstrip 中呈现。当打开这两个选项卡时,第二个选项卡中的 window 以空网格打开,有什么解决办法吗?请帮帮我!
这是我的window,!
@(Html.Kendo().Window()
.Name("headerWindow")
.Title("Select Option")
.Visible(false)
.Draggable()
.Width(500)
.Height(300)
//.LoadContentFrom("/asset/AccountGridPopup")
)
</div>
<script>
$(document).ready(function () {
var WindowForheader = $("#headerWindow").data("kendoWindow");
$("#acountCode").dblclick(function () {
//$("#accounttWindow").data("kendoWindow").center().open();
orisWindoOpenForHeader("/AssetTransaction/AccountGridPopup");
//alert("done");
});
function orisWindoOpenForHeader(url) {
WindowForheader.refresh({
url: url
})
WindowForheader.center().open();
}
});
要动态创建独特的网格,请在您的视图中执行以下操作:
@{
var gridId = Guid.NewGuid().ToString();
}
<script>
$("#@gridId").data("kendoGrid").bind("change", onAccountGridRowSelected);
</script>
@(Html.Kendo().Grid<MyModel>()
.Name(gridId)
.Columns(c =>
{
...Etc
)
我在 2 个具有相同网格内容(url 部分视图)的不同页面中有 2 个 kendo window。这 2 个页面也是部分页面 views.And 这 2 个视图在 tabstrip 中呈现。当打开这两个选项卡时,第二个选项卡中的 window 以空网格打开,有什么解决办法吗?请帮帮我! 这是我的window,!
@(Html.Kendo().Window()
.Name("headerWindow")
.Title("Select Option")
.Visible(false)
.Draggable()
.Width(500)
.Height(300)
//.LoadContentFrom("/asset/AccountGridPopup")
)
</div>
<script>
$(document).ready(function () {
var WindowForheader = $("#headerWindow").data("kendoWindow");
$("#acountCode").dblclick(function () {
//$("#accounttWindow").data("kendoWindow").center().open();
orisWindoOpenForHeader("/AssetTransaction/AccountGridPopup");
//alert("done");
});
function orisWindoOpenForHeader(url) {
WindowForheader.refresh({
url: url
})
WindowForheader.center().open();
}
});
要动态创建独特的网格,请在您的视图中执行以下操作:
@{
var gridId = Guid.NewGuid().ToString();
}
<script>
$("#@gridId").data("kendoGrid").bind("change", onAccountGridRowSelected);
</script>
@(Html.Kendo().Grid<MyModel>()
.Name(gridId)
.Columns(c =>
{
...Etc
)