or

('#div_widget').kendoWindow ({ actions: ["Refresh", "Maximize", "Minimize"], height : get_widget_setting (id_widget, "height", "300px"), width : get_widget_setting (id_widget, "width", "600px"), minWidth: 600, minHeight: 260, title : w.label, iframe : true, content: w.href, resize : function(e){ var widget = e.sender.element.data("kendoWindow"); var is_maximized = widget.options.isMaximized; // Is this a dirty hack? Are there another ways? if (is_maximized) { set_global_setting ("maximized_widget", id_widget); return; } var wrapper = widget.wrapper; save_widget_setting(id_widget, "height", wrapper.css("height")); save_widget_setting(id_widget, "width", wrapper.css("width")); }, dragend : function (e) { var position = e.sender.element.data("kendoWindow").wrapper.offset(); save_widget_setting(id_widget, "top", position.top + "px"); save_widget_setting(id_widget, "left", position.left + "px"); }})

@(Html.Kendo().Grid(Model.UnitTypes) .Name("Grid") .RowTemplate(@<tr> <td> <div>@item.Name</div> </td> <td> <div>@item.CurrentRun.Operation.WellContract.Location</div> </td> <td> <div>@item.CurrentRun.Operation.WellContract.Name</div> </td> <td> <div>@item.CurrentRun.Id</div> </td> <td> <div>@item.CurrentRun.RunTask</div> </td> <td> <div>@item.Status.StatusText</div> </td> <td> <div>Lamp</div> </td> <td> <div> <div class="progress progress-warning"> <div class="bar" style="width: 50%"> <span class="offset6" style="color: #676767;">@Math.Round(item.CurrentRun.LatestWellLogEntry.Depth.Value, 2)</span> </div> </div> </div> </td> <td> <div>@Math.Round(item.CurrentRun.LatestWellLogEntry.Speed.Value, 2)</div> </td> <td> <div>@Math.Round(item.CurrentRun.LatestWellLogEntry.Tension.Value, 2)</div> </td> <td> <div>@item.CurrentRun.Name</div> </td> <td> <form method="POST" action="~/UnitDetails/Index/@item.Id"> <input type="submit" class="k-button" value="Details" /> </form> </td> </tr> ) .HtmlAttributes(new { style = "height:430px;" }) .Columns(columns => { columns.Bound(p => p.Name).Title("Unit"); columns.Bound(p => p.CurrentRun.Operation.WellContract.Location).Title("Site"); columns.Bound(p => p.CurrentRun.Operation.WellContract.Name).Title("Well"); columns.Bound(p => p.CurrentRun.Id).Title("Run"); columns.Bound(p => p.CurrentRun.RunTask).Title("Task"); columns.Bound(p => p.CurrentRun.Operation.Description).Title("Operation"); columns.Bound(p => p.Status.StatusText).Title("Status"); columns.Bound(p => p.CurrentRun.LatestWellLogEntry.Depth).Title("Depth (m)"); columns.Bound(p => p.CurrentRun.LatestWellLogEntry.Speed).Title("Speed (m/min)"); columns.Bound(p => p.CurrentRun.LatestWellLogEntry.Tension).Title("Weight (kg)"); columns.Bound(p => p.CurrentRun.Name); columns.Command(command => command.Custom("Edit Unit").Action("Index", "UnitDetails")).Width(85); }) .DataSource(dataSource => dataSource.Server().Model(m => m.Id(p => p.Id))) .Pageable() .Scrollable(builder => builder.Height(250)) .Sortable())