on Change and Manual click problem

2 posts, 0 answers
  1. Dragos
    Dragos avatar
    45 posts
    Member since:
    Dec 2015

    Posted 08 Jun 2016 Link to this post

    Hello guys,


    I am trying to do the following. 

    I have a grid witch need to have selectable row. Inside each row i have a sparkline chart on witch when i click a kendo window must open.

    When i click on the row a kendo window opens as well.


    I know the normal behavior is to open 2 modals as it should. But i need to be able to open just one when i click on the sparkline and prevent the default one from the row.


    i have attached the followig dojo to better explain and show what i am failing to do.

    I guess this is kinda easy if you put selectable cell, but i need to select the whole row.


    Thank you.

  2. Dimiter Madjarov
    Dimiter Madjarov avatar
    2311 posts

    Posted 10 Jun 2016 Link to this post

    Hello Dragos,

    The change event handler of the the Grid does not provide information about the exact clicked element, so I assume using it will not be suitable for the current scenario. Possible solution would be to disable the selection of the Grid completely and attach a regular click handler to the Grid cells. In the handler you could determine if the clicked cell is a one with chart or not and open the corresponding window. At the at end of the handler you could manually select the current row by adding the k-state-selected CSS class to it (as this is what the selection is doing under the hood).

    Dimiter Madjarov
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top