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

[Solved] Formating as link

2 Answers 109 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.
Sean Cross
Top achievements
Rank 1
Sean Cross asked on 15 Nov 2009, 10:51 PM
I am having problems formating a cell as a link.  I am trying to display a task.  I need to show the task text, but like to the task item.

Doing it as an action works, byt then I can't use ajax binding

// doesn't work, won't show task text
columns.Add(t => t.Task).Format(Html.ActionLink("{0}", "ClaimNumber", new { Id = "{0}" })).Encoded(false);
// works but can't use ajax


columns.Add(t =>
     { %>
               <%= Html.ActionLink(t.Task, "ToDoItem", new { Id = t.Id })%>
      <% }).Title("Task");

Any ideas?

Sean

2 Answers, 1 is accepted

Sort by
0
Pam Redrum
Top achievements
Rank 1
answered on 16 Nov 2009, 06:22 AM
Seems
"Currently templated columns are supported only in Server Binding mode. Client-side templates will be implemented in a future release"

try use Html.ActionLink and check the parameter(may be you can try Html.ActionLink(t.Task, "ClaimNumber", new { Id = "{0}" }) ?)
0
Sean Cross
Top achievements
Rank 1
answered on 16 Nov 2009, 08:37 PM
I ended up with a view model that creates the link as a string property

Tags
Grid
Asked by
Sean Cross
Top achievements
Rank 1
Answers by
Pam Redrum
Top achievements
Rank 1
Sean Cross
Top achievements
Rank 1
Share this question
or