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

[Solved] Client Template with Ajax Binding

1 Answer 108 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Les
Top achievements
Rank 1
Les asked on 15 Feb 2011, 08:52 PM
Hi,

I am having trouble inserting two Html.ImageLink controls into a Grid. The following is just a quick demo of what I am attempting to achieve..

columns.Bound(c => 
        .ClientTemplate(
        Html.ImageLink("Delete", "~/Content/Images/rsCancel15x19.png", "border:none;", "Delete", new {id = c.ClassificationID}, 20, 10) + " " +
        Html.ImageLink("Update", "~/Content/Images/rsEdit15x19.png", "border:none;", "Edit", new { id = c.ClassificationID }, 20, 10);
    ).Title("Actions");

I need to pass the value of the lambda expression to the 'Delete' and 'Update' method.

Can you please suggest the correct syntax form for MVC3 and Razor or point me to an example which uses this feature as I could not locate one on this site.

Thanks as ever.

Les

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 16 Feb 2011, 08:16 AM
Hi Les,

 We don't have the exact same example but passing data using server side code is not possible. You need to use the client expressions. Check the client templates example.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Les
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or