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

View Details link in Grid (razor)

1 Answer 136 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Ron asked on 25 Oct 2012, 02:46 PM

Requirements

Kendo UI for ASP.NET MVC Q2 2012 SP1


jQuery v1.7.1


IE8, FF18


Components/Widgets Grid



PROJECT DESCRIPTION 
I'm trying add a grid column with a Razor ActionLink to pass two parameters to a controller action and display the record details in a new view.  The Grid loads the data, but my "view" link does not show up in the Grid.

This works with the MVC3 Razor WebGrid, but I cannot get it to work with the Kendo Grid. 

Here is my Grid layout:
@(Html.Kendo().Grid(Model)            //The grid will be bound to the Model which is the Products table
          .Name("ApplicationPersonal") //The name of the grid is mandatory. It specifies the "id" attribute of the widget.
      .Columns(columns =>
      {
          columns.Bound(p => p.Id);   //Create a column bound to the "ProductID" property
          columns.Bound(p => p.LastName).Title("Last");   //Create a column bound to the "ProductID" property
          columns.Bound(p => p.FirstName).Title("First"); //Create a column bound to the "ProductName" property
          columns.Bound(p => p.appid).Title("APP ID");   //Create a column bound to the "UnitPrice" property
          columns.Bound(p => p.Email).Title("Email");//Create a column bound to the "UnitsInStock" property
          columns.Bound(p => p.HomePhone).Title("Phone");//Create a column bound to the "UnitsInStock" property     
          columns.Bound(p => p.DOB).Title("DOB");//Create a column bound to the "UnitsInStock" property   
          columns.Template(p =>
       {
        
           @Html.ActionLink("view", "ViewApplicant", "Admin", null, null, null, null, new { appid = p.appid, uid = p.Id });
           
       });
              
      })
                     
)

Thanks.

1 Answer, 1 is accepted

Sort by
0
Hassan
Top achievements
Rank 1
answered on 09 Nov 2012, 06:08 PM
I am trying to do this too and no text appears just a blank column area

Hassan
Tags
Grid
Asked by
Ron
Top achievements
Rank 1
Answers by
Hassan
Top achievements
Rank 1
Share this question
or