问题描述
任何人都可以编写简单的步骤来在 kendo ui grid (mvc) 中实现层次结构.我一直在尝试他们的演示,但无法正常工作.非常感谢您的帮助!
Can anyone please write simple steps to implement hierarchy in kendo ui grid (mvc). I have been trying their demos but cannot get it working. thanks a lottt for your help!
我想我遗漏了一些东西,但这就是我正在做的事情(如 http://demos.kendoui.com/web/grid/hierarchy.html)
I think I am missing something but here is what i am doing (as on http://demos.kendoui.com/web/grid/hierarchy.html)
我将 .ClientDetailTemplateId("Grid2Template") 添加到我现有的网格中.然后我正在为上面的 Grid2Template 编写代码.
I am adding a .ClientDetailTemplateId("Grid2Template") into my existing grid.Then I am writing code for above Grid2Template.
我正在 100% 执行演示中显示的内容,但无法通过这两个步骤使其正常工作.有什么额外的事情吗?
I am doing 100% of what is shown in the demo but cannot get it to work with these two steps. Is there anything extra involved?
这是一个非常简单的演示项目... http://www.mediafire.com/?5qjyp40qfef7dkb
Here is a very simple demo project... http://www.mediafire.com/?5qjyp40qfef7dkb
推荐答案
你的问题有点棘手,很难找到.转到 webconfig 并删除以下行:
Your problem is kinda tricky and hard to find. Go to the webconfig and remove the following line:
<httpRuntime requestValidationMode="4.5" targetFramework="4.5" encoderType="System.Web.Security.AntiXss.AntiXssEncoder, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
此编码器 AntiXSS 破坏了客户端模板,网格无法显示详细信息模板.
This encoder AntiXSS mangles the client template and the Grid is unable to display the detail template.
此更改后项目应该可以正常运行.
The project should run fine after this change.
这篇关于剑道网格层次结构的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!