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

on Change and Manual click problem

1 Answer 26 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dragos
Top achievements
Rank 1
Dragos asked on 08 Jun 2016, 03:01 PM

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.

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 10 Jun 2016, 09:03 AM

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).

Regards,
Dimiter Madjarov
Telerik
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
Dragos
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or