THIS GRID IS LOCATED IN A PARTIAL-
@(Html.Kendo()
.Grid<USARAFSyncMVC.Areas.Event.Models.PaxModel>(Model.EventPaxBreakDowns)
.Name("PaxGrid")
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(p => p.PaxBDID))
.Create(update => update.Action("_InsertPax", "Event", new { Area = "Event" }))
.Update(update => update.Action("_SavePax", "Event", new { Area = "Event" }))
.Destroy(update => update.Action("_DeletePax", "Event", new { Area = "Event" })))
.Columns(columns =>
{
columns.Bound(p => p.CountryTitle);
columns.Bound(p => p.MilitaryPlanned);
columns.Bound(p => p.MilitaryActual);
columns.Bound(p => p.CivilianPlanned);
columns.Bound(p => p.CivilianActual);
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200).Title("Actions");
})
.Pageable()
.Scrollable()
.ToolBar(toolbar => toolbar.Create())
.Sortable()
)
IT IS THEN LOADING DYNAMICALLY INTO THIS WINDOW-
$("#windowcontainer").append("<div id='window'></div>");
var mywindow = $("#window").kendoWindow({
title: title,
content: { url: url },
visible: false,
draggable: false,
modal: true,
animation: false,
onclose: onclose,
onopen:onOpen,
deactivate: function () {
this.destroy();
}
}).data("kendoWindow");
mywindow.center();
mywindow.open();
It centers then the grid throws it off and it seems to anchor to the right of the screen. When I try to drag it, it expands, and it's right side stays anchored to the right side of the browser. When I resize, then I am able to drag it.
But I do not want any of that to happen, I would like it to just center in the first place.
BTW: It works fine without a grid!
Thanks