- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试实现自定义 Kendo 下载,该下载仅包含 ASP.NET MVC 4 项目中的网格,该项目使用 razor 生成网格,还使用服务器端代码生成网格数据。我在生成这些脚本的自定义下载页面中选择了适用的字段:
我在我的 _layout.cshtml 页面的 header 标签中包含了脚本和 css:
调用网格的代码绑定(bind)到具有两个字符串属性(name、desc)的简单模型并调用 Controller 操作:
@(Html.Kendo().Grid<GridStandAloneTest.Models.GridModel>()
.Name("Grid")
.Sortable()
.Pageable()
.DataSource(ds => ds.Ajax().Read("GetPeople", "Home")
.Batch(true)
.ServerOperation(false))
.Columns(x =>
{
x.Bound(c => c.Name);
x.Bound(c => c.Salary);
}))
当页面呈现时,网格可见,但永远不会调用 Controller 操作。我还在控制台中收到“Uncaught TypeError: undefined is not a function”。但是,如果我单击某个列,它会调用 Controller 操作,但随后会将其返回到新选项卡,并在 URL 下包含 JSON 数据。
Controller 代码如下:
public ActionResult GetPeople([DataSourceRequest]DataSourceRequest DataSource)
{
var people = new List<GridStandAloneTest.Models.GridModel>()
{
new GridStandAloneTest.Models.GridModel(){Name = "Jon", Salary = "50,000"},
new GridStandAloneTest.Models.GridModel(){Name = "Joe", Salary = "100,000"}
};
DataSourceResult result = people.ToDataSourceResult(DataSource);
return Json(result, JsonRequestBehavior.AllowGet);
}
最佳答案
你至少有两个问题:
instanceof
is not a function,它指向它正在检查寻呼机代码的位置。关于asp.net-mvc-4 - 使用仅包含带有 asp.mvc 包装器和数据源的网格的 KendoUI 自定义下载时出现 "Undefined is not a function"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29497394/
我有要在 KendoUI 网格中显示的数据。有一些 bool 数据,我希望它显示为复选框。此外,当用户单击复选框时,我需要做一些事情,所以我需要每一行数据的 onclick 事件。如何在 KendoU
我有 2 Kendo Treeview; 1 没有复选框,另一个 1 带有复选框 like example here 。 假设我想禁用第二个 Treeview 上的某些节点,当我选择第一个 Treev
removeTask 方法会弹出一个窗口,询问我是否确定要删除该任务, 这确实使得通过编程删除任务变得困难, 有人找到了我没有想到的方法(不改变剑道的代码)吗? 谢谢, 最佳答案 找到了我要找的东西,
收到未捕获错误:模板无效:来自此 kendoui 模板。我在这里缺少什么? ${DisplayText} 我想设置单选按钮来检查 Json 对象的 IsActive 属性是否为 true..
我通过 API 获取 JSON 数据并使用 Kendo UI 将其显示在表格中。 $scope.ReportViewGrid = function ReportViewGrid(jsonData) {
我正在尝试按两个字段对数据源进行分组,并获取它们值的平均值或总和。但即使我在数据源中指定了组和聚合属性,我也无法获取它。 代码如下: var dataSource = new kendo.data.D
我正在创建这样的 KendoUI 模板: Flows in action
我有一个 JSON 数据结构,需要在 Kendo UI 网格中显示。数据是这样的 [ {"ObjType": {"Key1":"Value1", "Key2":"Value2", "Key3":["1
使用下面的示例,x 轴系列并非从相同的 x 值开始。 x 轴将在中途从 0 重新开始。 function createChart() { $("#chart").kendoChart({
我在对 kendoUI 网格的日期时间进行排序时遇到问题,请参阅 my grid snapshot ,日期排序正确(从最近的日期时间排序),但时间不正确,其中“Jul/08/2016 15:04:22
有没有办法在运行时在 KendoUI 网格列中创建不同类型的控件?场景是,我的网格中有 2 列。第一列显示一个下拉列表,其中包含一些字符串,例如“名称”、“开始日期”等。当用户从中选择一个值时,我想在
我正在使用包含在 中的 KendoUI 自动完成功能。如果在自动完成选项打开时按 Enter 键,则 Enter 键只会关闭选项,并且您必须再次按 Enter 键才能提交表单。监听输入上的按键来检查
下面我有一个 kendoUI 网格,它从服务器获取数据。然后,用户可以编辑网格中的两列。我有一个单独的按钮,可以将数据发送回服务器,并且我不使用剑道网格的 UPDATE 传输来执行此操作。我遇到的问题
在 Kendo UI 中,是否可以使用图标而不是按钮来执行 KendGrid 中的自定义命令?我需要这个,因为按钮似乎有一个最小宽度,这对我的页面来说太大了。即使我指定宽度它也不会减少。 co
我正在使用 KendoUI Grid 在启用 KnockoutJS MVVM 的应用程序中显示我的数据。由于 MVVM 是客户端的架构,我正在维护一个 knockoutjs observerble 数
在我的剑道网格中,我想更改过滤器中的日期格式 Ex: 1/30/2015 to Jan 30, 2015 我已经更改了 Start Date 的日期格式 field:
我正在尝试使用 JSON 数据填充 KendoUI 网格,其中服务器返回总行数以及数据,但是我在让 serverPaging 正常工作时遇到了一些问题。我创建并分配网格的数据源如下:
我正在尝试使用 kendo ui 在堆叠图中显示数据。这是我的代码: var data = [ // June { Start: "2014-06-01T00:00:00", Name
有什么方法可以连接 KendoUI 可拖动项以添加到 KendoUI 可排序列表中,例如此处的 jQueryUI:http://jqueryui.com/draggable/#sortable .我为
我有一个 kenodui Treeview ,我试图扩展顶级节点,如果它们具有以下值:“事件”或“关闭”,其余节点可以保持关闭状态。我使用以下代码来创建我的 Treeview : if (CI.Pop
我是一名优秀的程序员,十分优秀!