Telerik Grid 的客户端 ActionLink
我想要实现的是从现有代码中获取 jquery 模态弹出窗口 - 通过 telerik 网格中的 ActionLink,但我缺少语法,如果有人可以帮忙,请
这个 actionlink 完美地显示模态。
<%: Html.ActionLink("Edit", "DemoEdit", new { xid = item.Userid }, new { @class = "abookModal", title = "Edit Person" })%>
所以我将其嵌入到 Telerik 网格中,就像在客户端一样。
.Columns(columns =>
{
columns.Bound(e => e.Userid);
columns.Bound(e => e.Name);
columns.Bound(e => e.Email);
columns.Bound(e => e.Userid)
.ClientTemplate(Html.ActionLink("Edit", "DemoEdit", new {xid = "<#= Userid #>"}).ToString(), new { @class = "abookModal", title="Edit Person"});
最后一部分从 new { @class = "abookModal", title="Edit Person"}
不会被采纳,因为“方法‘ClientTemplate’没有重载需要 2 个参数。
对此有什么解决方案吗?
What am trying to achieve is to get a jquery modal popup from the existing code - through ActionLink in telerik grid, but am missing the syntax, if someone could help out please
this actionlink works perfectly bringing out the Modal.
<%: Html.ActionLink("Edit", "DemoEdit", new { xid = item.Userid }, new { @class = "abookModal", title = "Edit Person" })%>
and so I embedded this into telerik grid, as in client side.
.Columns(columns =>
{
columns.Bound(e => e.Userid);
columns.Bound(e => e.Name);
columns.Bound(e => e.Email);
columns.Bound(e => e.Userid)
.ClientTemplate(Html.ActionLink("Edit", "DemoEdit", new {xid = "<#= Userid #>"}).ToString(), new { @class = "abookModal", title="Edit Person"});
the very last part starting fromnew { @class = "abookModal", title="Edit Person"}
wouldn't be taken in because "No overload for method 'ClientTemplate' take 2 arguments.
Any solution to this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用锚标记而不是 html.actionlink
You may use anchor tag instead of html.actionlink
我认为您的 ClientTemplate 上的括号可能应该是关闭
的
I think the parentheses on your ClientTemplate might be off
should be