Telerik MVC网格控制 [英] Telerik MVC Grid Control

查看:137
本文介绍了Telerik MVC网格控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我对网格进行排序并单击列的图像链接时,没有任何反应.
简而言之,如果客户端模板是图像,则客户端模板中的链接不起作用.

When I sort the grid and click on the image link of the column nothing happens.
In short if client template is an image, the link in client template is not working.

<% Html.Telerik().Grid(Model.GetVariables)
                        .Name("VariableGrid")
                        .DataKeys(dataKeys => dataKeys.Add(m => m.variableId))
                        .Columns(columns =>
                            {
                                columns.Bound(m => m.variableDescription).Title("Description");
                                columns.Bound(m => m.variableVoiceLink).Title("Voice Link")
                                    //Template to show Listen (Speaker) icon
                                    .Template(m =>
                                            {%>
                                                <a href="#?w=300" rel="popup_Upload" class="poplightUpload" lang="<%=m.variableId%>" >
                                                    <img title="Upload audio" style="border:0; float:right;"  src="<%:Url.Content("~/Content/TMG/Images/Upload.png") %>" />
                                                </a>
                                                <% if (!string.IsNullOrEmpty(m.variableVoiceLink))
                                                   { %>

                                                        <sup><label style="padding-right:4px; font-size:small;" ><%=m.variableVoiceLink%> </label>
                                                        <a style=" padding:6px" href="#?w=300" rel="popup_name" class="poplight" lang="<%=m.variableVoiceLink%>" >
                                                            <img title="Play Voice" style="border:0; float:right; padding-right:3px;"  src="<%:Url.Content("~/Content/TMG/Images/speaker.png") %>" />
                                                       </a>
                                                       </sup>

                                                   <%}
                                                   else
                                                   {%> <label><%=m.variableVoiceLink%> </label> <%} %>

                                            <%})
                                    

.ClientTemplate("<a href='#?w=300' rel='popup_Upload' class='poplightUpload' lang = '<#= variableId #>' >" +
                                                        "<img title='Upload audio' style='border:0; float:right;'  src='../Content/TMG/Images/Upload.png'/>" +
                                                      "</a>" +
                                                       "<# if (variableVoiceLink != null)" +
                                                        "{ #> <sup><label style='padding-right:4px; font-size:small;'> <#= variableVoiceLink #> </label>" +
                                                              "<a href='#?w=300' rel='popup_name' class='poplight' lang = '<#= variableVoiceLink #>' >" +
                                                                "<img title='Play Voice' style='border:0; float:right;'  src='../Content/TMG/Images/speaker.png'/>" +
                                                              "</a></sup>" +
                                                        "<# } #>");

推荐答案

您是否尝试过在这里查看: Telerik MVC网格论坛 [^ ]
我只是认为,在telerik论坛上发布有关第三方控制的此类问题会更​​有用.
可能有人已经在那边讨论过!发布前先搜索.

张贴在这里很好.也许有人可以帮忙,但我发现与第三者有关的特定问题可以在各自的论坛中得到更快,更准确的回答.
Did you tried looking here: Telerik MVC Grid Forum[^]
I just think, posting such issues about a 3rd party control at telerik Forum would be more useful.
Might be someone already discussed it over there! Search before posting.

Posting here is fine. Might be someone can help but I had found that specific questions related to 3rd party is answered more quickly and accurately at respective forums.


这篇关于Telerik MVC网格控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆