This is a migrated thread and some comments may be shown as answers.

[Solved] Problem with Custom button in Telerik MVC Grid

0 Answers 14 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chris
Top achievements
Rank 1
Chris asked on 22 Nov 2012, 11:11 PM
Hi,

I'm placing a toolbar with an Export To CSV button passing a routeValue (Guid) by using <#= Id #>, however it is not being rendered correctly. 

This code:

ToolBar(commands => commands.Custom()
                                                    .HtmlAttributes(new { id = "export_<#= Id #>" })
                                                    .Text("Export to CSV")
                                                    .Action("ExportDlr", "Job", new { JobId = "<#= Id #>" }))

... Produces: 

<a class="t-button " href="/Orchard/Job/ExportDlr?JobId=%3C%23%3D%20Id%20%23%3E&amp;_=1353625773334" id="export_9d8e5f5e-881d-4f7e-a709-33650a7e2760">Export to CSV</a>

Notice that the HtmlAttribute id is rendering correctly using the same <#= Id #>, however the JobId routevalue is not. 

Can you kindly enlighten me on this issue?

Thanks and regards,

Chris
Tags
General Discussions
Asked by
Chris
Top achievements
Rank 1
Share this question
or