views:

166

answers:

1

I don't find a method to add a custom column in a MvcContrib Grid. With the old version you could do :

column.For("Edit").Do(p => { %>
  <td>
   <a href="/People/Edit/<%= p.Id %>">Edit</a>
  </td>
 %>});

But with the latest version, the Do() method disappears... So now which method use ?

+1  A: 

I find the solution :

You have to use the MvcContrib.UI.Grid.ActionSyntax namespace

and it provides you an extension method called "Action".

Here is a simple use :

column.For("PDF").Named("PDF").Action(p => { %> 
<td><img src="../Content/Images/pdf.gif" /></td> <% });
LoSTxMiND