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

Use Edit button in Row to Navigate

1 Answer 663 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Reid
Top achievements
Rank 2
Reid asked on 23 Jan 2017, 03:13 PM

Is there way to hook the Edit button in the row to navigate to another template?  I would like to navigate to another template that has a hierarchical grid that would display relevant data.  In this case the initial grid shows a listing of tests. 

When the user clicks the "edit" button in the grid I want to navigate to another page representing the questions and answers for the selected test in a hierarchical grid.  So how could the second page's Grid pass the testId from the action (URL) to the Read() function specified in the grid?

 

Thanks!

1 Answer, 1 is accepted

Sort by
0
Accepted
Alex Hajigeorgieva
Telerik team
answered on 25 Jan 2017, 02:19 PM
Hi Reid,

The desired functionality to navigate from the Kendo UI Grid to another page can be achieved with the help of a custom command button.

Both of the links below demonstrate а grid with custom command buttons which when clicked obtain the relevant dataItem:

Official Demo: http://demos.telerik.com/kendo-ui/grid/custom-command
API Reference: http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.command.click

Once you have the dataItem, you may use standard JavaScript technique to redirect to the desired URL, e.g:

window.location = "url/" + item.id;

Once on the second page, to pass an additional parameter to the Kendo UI Grid with hierarchy, you may configure its data source with the help of the transport read data option:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-transport.read.data

Kind Regards,
Alex Hajigeorgieva
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Reid
Top achievements
Rank 2
Answers by
Alex Hajigeorgieva
Telerik team
Share this question
or