Use Edit button in Row to Navigate

2 posts, 1 answers
  1. Reid
    Reid avatar
    431 posts
    Member since:
    Oct 2008

    Posted 23 Jan 2017 Link to this post

    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!

  2. Answer
    Alex Hajigeorgieva
    Admin
    Alex Hajigeorgieva avatar
    593 posts

    Posted 25 Jan 2017 Link to this post

    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.
Back to Top