PDA

View Full Version : Two event listener in one grid table



gigas01
16 Oct 2012, 7:37 AM
Hi,

I'll show you the ui first.

39406

there are two event listener on this table.

if the user click a row, it has to popup a new window with googlemap

And if the user press delete button, it has to show a different alert popup window.
(are you sure you want to delete? msg)

The problem is, these two events are in the same table.

So if the user press delete button, it calls two event -> google map and delete event...

i just want to call delete event.

Is there a good idea with this issue?

Thank you

willigogs
16 Oct 2012, 1:35 PM
Inside your event listener, check the target to see whether the user has clicked the delete element.

It depends what event you're using also - using cellclick could obviously be coded to act differently when clicking in the actions column by checking the column ID on click.

jorgeluislay
17 Oct 2012, 12:13 AM
Do another action behind delete button. So you have three buttons and the third one is showing your google map.