or
I have a server bound grid that is working well until I add a second command button to a row. When I do this the formatting is thrown off and a second grid is placed at the bottom of the first. Does anyone recognize the problem?
@(Html.Kendo().Grid<TimeAndAttendance.Models.DaysActivityViewModel>(Model.DayActivities) .Name("DaysActivities") .Columns(columns => { columns.Bound(da => da.Facility); columns.Bound(da => da.Position); columns.Bound(da => da.Shift); columns.Bound(da => da.Paycode); columns.Bound(da => da.Hours); columns.Bound(da => da.Notes); columns.Command(command => { command.Edit().Text(""); }); }) .Scrollable() .HtmlAttributes(new { style = "height:200px;" }) .DataSource(dataSource => dataSource .Server() .Update(update => update.Action("Edit", "IndividualTimeEntry")) .Destroy(destroy => destroy.Action("Delete", "IndividualTimeEntry")) .Model(model => model.Id(da => da.ID)) ) )@(Html.Kendo().Grid(Model) .Name("Grid") .Columns(columns => { columns.Bound(p => p.Id).Width(60); columns.Bound(p => p.Title).Width(250); }) .Sortable() .DataSource(dataSource => dataSource .Ajax() .PageSize(10) .Read(read => read.Action("Get", "Grid", new {view = "MyActive", showAll = false})) ) )columns.Bound(c => c.IsRead).ClientTemplate("" + "#if(IsRead== true) {#" + "Read"+ "#} else{#" + "Not Read + "#}#") .Title("State").Width(120);columns.Bound(c => c.IsRead).ClientTemplate("" + "#if(IsRead== true) {#" + "#=data.Id#"+ // Shows parent Id "#} else{#" + "\\#=data.Id\\# + // Shows the correct id from the detail row "#}#") .Title("State").Width(120); <script> function submit() { $("#searchForm").submit() } </script> @(Html.Kendo().DropDownListFor(m => m.ListID).DataValueField("ID").DataTextField("Name") .BindTo(Model.Lists).Events(e => e.Change("submit"))) @Html.Kendo().AutoCompleteFor(m => m.SearchText).Placeholder("Search") <input type="submit" value="Search" /> @Html.Kendo().Grid(Model.Albums).Name("AlbumsGrid").BindTo(Model.Albums).Pageable().Sortable()}public JsonResult Scheduler_Create([DataSourceRequest] DataSourceRequest request, SchedulerModel model) { Calendar_Entry entry = new Calendar_Entry { ID=Guid.NewGuid(), Description=model.Description, End=model.End, Begin=model.Start, CreationTime=DateTime.UtcNow, UpdateTime=DateTime.UtcNow, Name=model.Title, Calendar_ID=model.CalendarID }; dbContext.Add(entry); dbContext.SaveChanges(); model.ID = entry.ID; return Json(new[] { model }.ToDataSourceResult(request, ModelState)); }@(Html.Kendo().Scheduler<ViCRM.Models.SchedulerModel>() .Name("scheduler") .Date(DateTime.UtcNow) .StartTime(new DateTime(DateTime.UtcNow.Year, DateTime.UtcNow.Month, DateTime.UtcNow.Day, 6, 0, 0)) .Height(750) .Views(views => { views.DayView(); views.WeekView(weekView => weekView.Selected(true)); views.MonthView(); views.AgendaView(); }) .Timezone("Etc/UTC") .DataSource(d => d .Model(m => { m.Id(f => f.ID); }) .Read("Scheduler_Read", "Calendar") .Create("Scheduler_Create", "Calendar") .Destroy("Scheduler_Delete", "Calendar") .Update("Scheduler_Update", "Calendar") ) .EventTemplateId("EventTemplate") .Resources(res => { res.Add(m => m.CalendarID).Title("Kalender").DataSource(ds => ds.Read("getCalendars", "Calendar")).DataValueField("Value").DataTextField("Text").DataColorField("Color"); )01.@using Kendo.Mvc.UI02.@model IEnumerable<Forms.Models.Pending>03. 04. 05.@{06. Layout = "~/Views/Shared/_Layout.cshtml"; 07.}08. 09.<h2>Pending</h2>10. 11.@(Html.Kendo().Grid(Model)12. .Name("Grid")13. .Columns(columns =>14. {15. columns.Bound(p => p.Name).Groupable(false);16. columns.Bound(p => p.Number);18. columns.Bound(p => p.Status);21. columns.Bound(p => p.Analyst);22. })23. .Editable(editable => editable.Mode(GridEditMode.InCell))24. .Pageable()25. .Sortable()26. .DataSource(dataSource => dataSource27. .Ajax()28. .Model(model => model.Id(p => p.Id))29. .Read("Index", "Home")30. .Update("Row_Edit", "Home")31. )32.)<!DOCTYPE html><html><head> <title></title> <link href="@Url.Content("~/Content/kendo/2013.2.716/kendo.common.min.css")" rel="stylesheet"/> <link href="@Url.Content("~/Content/kendo/2013.2.716/kendo.default.min.css")" rel="stylesheet"/> <link href="@Url.Content("~/Content/kendo/2013.2.716/kendo.mobile.flat.min.css")" rel="stylesheet"/> @*<script src="~/Scripts/jquery-1.8.2.min.js"></script>*@ <script src="@Url.Content("~/Scripts/kendo/2013.2.716/jquery.min.js")"></script> <script src="@Url.Content("~/Scripts/kendo/2013.2.716/kendo.all.min.js")"></script> <script src="@Url.Content("~/Scripts/kendo/2013.2.716/kendo.aspnetmvc.min.js")"></script></head><body> @(Html.Kendo().MobileLayout() .Name("frontlayout") .Header(obj => Html.Kendo().MobileNavBar() .Content(navbar => @<text> @navbar.ViewTitle("") </text>) ) .Footer(obj => Html.Kendo().MobileTabStrip() .Items(items => { items.Add().Icon("action").Text("Logout").Url("index", "logout"); }) ) ) @(Html.Kendo().MobileLayout() .Name("layout") .Header(obj => Html.Kendo().MobileNavBar() .Content(navbar => @<text> @(Html.Kendo().MobileBackButton() .Align(MobileButtonAlign.Left) .HtmlAttributes(new { @class = "nav-button" }) .Url(Url.RouteUrl(new { controller = "home" })) .Text("Back")) @navbar.ViewTitle("") </text>) ) .Footer(obj => Html.Kendo().MobileTabStrip() .Items(items => { items.Add().Icon("action").Text("Logout").Url("index", "logout"); }) ) ) @(Html.Kendo().MobileApplication() .ServerNavigation(false) .Transition("fade") .HideAddressBar(true) .Skin("flat") ) @RenderBody()</body></html><!-- Style for custom status icon in list --><style> .statusicon { float: right; margin-right: 50px; margin-top: 5px; display: inline-block; border-width: 1px; border-radius: 35px; border-style: solid; border-color: black; width: 15px; height: 1em; } .sl-hidden { display: none; visibility: hidden; }</style>@model Stimline.Xplorer.Mobile.Models.UnitDetailsModel@Scripts.Render("~/Scripts/jquery.signalR-1.1.2.js")@Scripts.Render("~/signalr/hubs")@Scripts.Render("~/Scripts/Stimline/connector.js")@(Html.Kendo().MobileView() .Name("unit-list") .Layout("layout") .Title("Units") .Content( @<text> <span class="sl-hidden" id="signalRconveyanceId">@Model.ViewUnitContract.ConveyanceId</span> @ListViewHelper(this) </text> ) )@helper ListViewHelper(WebViewPage page){ @(Html.Kendo().MobileListView().Name("unitlist").Style("inset").Type("group") .Items(root => { root.Add().Text("Unit Details").Items(items => { items.Add().Content(@<text> <label> Unit <input type="text" disabled="disabled" style="color: black" value="@Model.ViewUnitContract.Name" /> </label> <li style="background-color: #@Model.StatusColor"> <label> Status <input type="text"disabled="disabled" value="@Model.StatusMessage" style="color: ghostwhite;"/> </label> </li> </text>); }); root.Add().Text("Detail information").Items(items => { items.Add().Content(@<text> <label> Depth (m) <input id ="signalRdepth" type="text" disabled="disabled" style="color: black" value="@Math.Round((decimal) Model.ViewUnitContract.CurrentRun.LatestWellLogEntry.Depth, 2)" /> </label> <li data-icon="recents"> <label> Speed (m/min) <input id ="signalRspeed" type="text" disabled="disabled" style="color: black" value="@Math.Round((decimal) Model.ViewUnitContract.CurrentRun.LatestWellLogEntry.Speed, 2)"/> </label> </li> <li data-icon="recents"> <label> Diff Speed (m/min) <input id ="signalRdiffSpeed" type="text" disabled="disabled" style="color: black" value="@Math.Round((decimal) Model.ViewUnitContract.CurrentRun.LatestWellLogEntry.DiffSpeed, 2)"/> <!-- DiffSpeed --> </label> </li> <li data-icon="recents"> <label> Weight (kg) <input id ="signalRtension" type="text" disabled="disabled" style="color: black" value="@Math.Round((decimal) Model.ViewUnitContract.CurrentRun.LatestWellLogEntry.Tension, 2)"/> </label> </li> <li data-icon="recents"> <label> Diff Weight (kg) <input id ="signalRdiffTension" type="text" disabled="disabled" style="color: black" value="@Math.Round((decimal) Model.ViewUnitContract.CurrentRun.LatestWellLogEntry.DiffTension, 2)"/> <!-- DiffTension --> </label> </li> </text>); }); root.Add().Text("Run Overview").Items(items => { items.Add().Content(@<text> <label> Name <input type="text" disabled="disabled" style="color: black" value="@Model.ViewUnitContract.CurrentRun.Name" /> </label> <li data-icon="recents"> <label> Start time <input type="text" disabled="disabled" style="color: black" value="@Model.ViewUnitContract.CurrentRun.StartTime"/> </label> </li> <li data-icon="recents"> <label> End time <input type="text" disabled="disabled" style="color: black" value="@Model.ViewUnitContract.CurrentRun.EndTime"/> </label> </li> </text>); }); root.Add().Text("Project").Items(items => { items.Add().Content(@<text> <label> Operation <input type="text" disabled="disabled" style="color: black" value="@Model.ViewUnitContract.CurrentRun.Operation.Description"/> </label> <li> <label> Name <input type="text" disabled="disabled" style="color: black" value="@Model.ViewUnitContract.CurrentRun.Operation.ProjectContract.Name"/> </label> </li> </text>); }); root.Add().Text("Well").Items(items => { items.Add().Content(@<text> <label> Name <input type="text" disabled="disabled" style="color: black" value="@Model.ViewUnitContract.CurrentRun.Operation.WellContract.Name"/> </label> <li> <label> Location <input type="text" disabled="disabled" style="color: black" value="@Model.ViewUnitContract.CurrentRun.Operation.WellContract.Location"/> </label> </li> </text>); }); }) )}