0

I am currently working on an ASP.NET project using the Kendo/Telerik Grid. I have already implemented the Grid and it is working.

However, I now have the following problem: I would like to have a detailed view for each individual entry in the Kendo/Telerik list. (For the Kendo Grid I use the Person model and for the Detail View I want to use the DetailPerson model). The detail page should be accessible via a button located in each row of the grid.

In the first picture, you can see the function that I call in the Kendo Grid to get to the Detail Page 1. Currently, the DetailPerson page is empty. And this is part of the Kendo Grid where I call the showDetail function:

columns.Command( command => command.Custom("-").Text(" ").Click("showDetails")).Width(100);

To sum up, I want to implement the following:

  1. Click on a button of the Kendo grid (lets say Person X)
  2. Get to the Detail page and show more information about Person X.

Does anyone have an idea how to implement that? Thank you very much!

1

1 Answer 1

0

Besides the hierarchy option suggested you can check this demo that show details in a popup window. To redirect instead of showing the popup window, generate the url and add the query parameter based on information in the dataItem:

function showDetails(e) {
    e.preventDefault();

    var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
    var url = "@Url.Action("Detail","Person")" + "?persionID=" + dataItem.EmployeeID;
    window.location.href = url;
}

Make sure the Detail action expects a parameter named personID.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.