This is a migrated thread and some comments may be shown as answers.

Grid's k-grid-content div renders twice

0 Answers 84 Views
This is a migrated thread and some comments may be shown as answers.
Jark Monster
Top achievements
Rank 1
Jark Monster asked on 26 Jul 2012, 07:22 PM
The entire grid doesn't render twice.  Just the content div.  Also, the second content div contains an ajax loader that never goes away (See attached image).

Not sure what I'm doing incorrectly.  I've tried removing the grid from the Panel Bar, but it hasn't made any difference yet. 

I'm not sure if it's a library thing or some configuration issue.  I had typed everything in plain jQuery, and that worked, but I have recently switched over to this format because I found it easier to write.

Kendo UI Version: kendoui.web.2012.2.710
Browser: Firefox - v15.0
OS: Windows 7
jQuery: Same version packaged with Kendo UI download

Thanks in advance!

@model Company.Domain.MVC.Models.ShipmentModel
@using Kendo.Mvc.UI
    Layout = "~/Views/Shared/_StandardLayout.cshtml";
    ViewBag.Title = "Home";
<script type="text/javascript">
    function QuoteItemGrid_ErrorHandler(e) {
        if (e.errors) {
            var message = "Errors:\n";
            $.each(e.errors, function (key, value) {
                if ('errors' in value) {
                    $.each(value.errors, function () {
                        message += this + "\n";
<div id="ShipmentForm">
        .HtmlAttributes(new { style = "width:100%" })
        .Items(panelBar =>
            panelBar.Add().Text("Shipment Items")
                        .Columns(columns =>
                            columns.Bound(i => i.FreightClass).Width(50);
                            columns.Bound(i => i.Length).Width(50);
                            columns.Bound(i => i.Width).Width(50);
                            columns.Bound(i => i.Height).Width(50);
                            columns.Bound(i => i.DimensionUnitOfMeasure).Width(50);
                            columns.Bound(i => i.QuantityValue).Width(50);
                            columns.Bound(i => i.QuantityUnitOfMeasure).Width(50);
                            columns.Bound(i => i.Weight).Width(50);
                            columns.Bound(i => i.WeightUnitOfMeasure).Width(50);
                            columns.Bound(i => i.NmfcCode).Width(50);
                            columns.Bound(i => i.ItemDescription).Width(50);
                        .ToolBar(toolbar =>
                        .Editable(editable => editable.Mode(GridEditMode.InCell))
                        .DataSource(dataSource => dataSource
                            .Events(events => events.Error("QuoteItemGrid_ErrorHandler"))
                            .Model(model => model.Id(i => i.ItemID))
                            .Create(create => create.Action("CreateProducts", "Home"))
                            .Read(read => read.Action("GetProducts", "Home"))
                            .Update(update => update.Action("UpdateProducts", "Home"))
                            .Destroy(destroy => destroy.Action("DeleteProducts", "Home"))
                .Content(@<div>Services here</div>);
            panelBar.Add().Text("Address Information")
                .Content(@<div style="margin-left:1%;">
                   HTML omitted for brevity
                    HTML omitted for brevity

No answers yet. Maybe you can help?

Asked by
Jark Monster
Top achievements
Rank 1
Share this question