Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1730
@Ajax.ActionLink in Column Template
posted

Hi,

I am using Asp.Net MVC 3 and Infragistic Grid. I am using column template as below:

col.For(x => x.SummaryID).HeaderText("ID").Template("<a id='lnkSummaryID' href='${SummaryID}'>${SummaryID}</a>");

 

Is there any way to use @Ajax.ActionLink instead of Anchor tag in column template ??

 

Parents
No Data
Reply
  • 23953
    Offline posted

    Hi,

    I couldn't make it work. Here is my code:

     

    Code Snippet
    1. col.For(x => x.SummaryID).Template(Ajax.ActionLink("${SummaryID}", "OpenSummary", "Home", new { summaryID = "${SummaryID}" }, new AjaxOptions() { UpdateTargetId = "customerContainer" }).ToString());

     

    In this code the problem is in "new { summaryID = "${SummaryID}" }" code in which I tried to pass SummaryID as GET query argument. However the dolar sign($) and the curly brackets ({}) are encoded and Infragistics templating engine cannot substitute the ${SummaryID} placeholder. You can see what I'm talking about in the attached screenshot.

     

    Best regards,

    Martin Pavlov

    Infragistics, Inc.

Children