English 中文(简体)
Kendo Grid plumbing
原标题:Kendo Grid plumbing

I m试图将Kendo UI电网连接到我的MVC3仪表中,但I m没有获得任何数据显示。 我认为这应该简单,但我看不到。 我的守则是:

观点:

@model List<pests.web.com.Models.Workitem>

@{
    ViewBag.Title = "Worklist";
    ViewBag.CurrentPage = "Worklist";
}

    <div id="grid"></div>

    <script type="text/javascript">
        $("#grid").kendoGrid({
            dataSource: {
                type: "json",
                transport: {
                    read: {
                        url: "Home/GetWorklist",
                        dataType: "json",
                        type: "POST",
                        contentType: "application/json; charset=utf-8",
                        data: {}
                    }
                },
                columns: [
            {
                field: "PartNumber",
                width: 90,
                title: "Part Number"
            },
            {
                field: "ProcurementCode",
                width: 90,
                title: "Procurement Code"
            },
            {
                width: 100,
                field: "Priority"
            },
            {
                field: "Status"
            }
            ]
            }
        });
    </script>


<script type="text/javascript" src="../../Scripts/people.js"></script>
<script type="text/javascript" src="../../Scripts/kendo.web.min.js"></script>
<script type="text/javascript" src="../../Scripts/console.js"></script>
<link href="../../Styles/kendo.common.min.css" rel="stylesheet" />
<link href="../../Styles/kendo.default.min.css" rel="stylesheet" />

Layout page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Styles/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
</head>

    <body>

        @RenderBody()

    </body>
</html>

主计长认为:

 public class HomeController : Controller
    {
        [HttpPost]
        public ActionResult GetWorklist()
        {
            List<Workitem> worklist = PestsLogic.GetWorklist();
            return View("Home", worklist);
        }
    }

“工作清单”正在退回几个项目。 它们是具有少数特性的简单物体。 这里指的是:

public class Workitem
{
    public string PartNumber { get; set; }
    public string ProcurementCode { get; set; }
    public int Priority { get; set; }
    public string Status { get; set; }
}

是否有一点明显的事实是,我ve不见错? 没有任何错误信息,只是一个空白页(尽管有标题)。

感谢!

最佳回答

问题完全是,在我试图使用Kendo电网之前,我需要将参考文件移至他处。

问题回答

暂无回答




相关问题
Using jquery to get a partial view and updating the UI

I need to render a partial view (returned from the controller) to show some customer summary details. This will need to happen when the user clicks on a button. In the the mean time the user can ...

MVC 2 / MVC 3 / MVC 4

MVC 2 我们可以轻松地创造领域。 现在,我的问题涉及nes地区(地区内)。

Asp.Net MVC 2 - Changing the PropertyValueRequired string

Using a resx file in the App_GlobalResources directory, I ve been able to change the default message for the PropertyValueInvalid string of the model validators. But it doesn t work to translate the ...

ASP.NET MVC 3 - What features do you want to see? [closed]

I know a bunch of people that are really enjoying the improvements that ASP.NET MVC 2 made over the first release. I have just started to migrate our MVC 1 project over and so far areas has totally ...

热门标签