Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
Here is my code


C#
@Html.Grid(Model.VehicleAddList).Columns(columns =>
                   {
                       columns.Add(c => c.VehicleNo).Titled("Vehicle No.");
                       columns.Add(c => c.VehicleName).Titled("Vehicle Type").Filterable(true);
                       columns.Add(c => c.DriverName).Titled("Driver Name");
                       columns.Add(c => c.GPSIMEI).Titled("GPS IMEI");
                   }).WithPaging(4).Sortable(true)



my problem is i want to make VehicleNO column as anchor tag? pls help
Posted
Comments
Siva Hyderabad 21-Feb-14 5:11am    
Why don't you taken in TemplateField?
Member 10028392 21-Feb-14 5:25am    
tempalteFiles doesnt exist in grid.mvc only renderValue as is there but i dono how to use it

1 solution

Try This
C#
column.For(c => "<a href='" + c.VehicleLink + "' >" + c.VechicleNo + "</a>");
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900