Flexigrid : Is there a callback for the click Event

29 views
Skip to first unread message

Carsten Müller

unread,
Nov 20, 2009, 9:26:06 AM11/20/09
to Flexigrid for jQuery
Hi all,

the question is that I want to use a popup for editing the selected
(clicked) record. Is there an option for setting a callback function
when clicked a row (for opening another popup)...

Thanks
Carsten Müller

Carsten Müller

unread,
Nov 23, 2009, 6:29:14 AM11/23/09
to Flexigrid for jQuery
Okay, I just helped myself and changed the code :

1. I've added a new option :

.... , onClick: false ....


2. In the objectcreation I've changed the click event :


...
// give a CallBack to the user.....
if (p.onClick)
p.onClick();
...

3. Object creation as follows :

...
onClick: function() { showSub(); }
...

Now I will try to return some parameters of/to the onClick function
(f.e. id of the selected row or similiar data...).
Hope this is allowed...

Carsten

Carsten Müller

unread,
Nov 23, 2009, 8:46:46 AM11/23/09
to Flexigrid for jQuery
Change :

Config :
------------------------------------------------------------------------------------------------------------
...
onClick: function showSub( para1 ){ alert('->' + para1 + '<-' ); }
...

Plugin :
------------------------------------------------------------------------------------------------------------
...
if (p.onClick) {
p.onClick( $(this).attr('ID') );
}
...

Darren

unread,
Nov 22, 2009, 6:44:12 PM11/22/09
to Flexigrid for jQuery
This has been talked about before.

http://groups.google.com/group/flexigrid/browse_thread/thread/d86bdd7d3cb5dacf/6aee962a2694dacd?lnk=gst&q=click+event#6aee962a2694dacd

Not exactly what you wanted, but you should be able to implement it of
that.

Carsten Müller

unread,
Nov 24, 2009, 3:43:30 AM11/24/09
to Flexigrid for jQuery
I see, this is the solution without any need to change the plugin..

Thanks Darren
Reply all
Reply to author
Forward
0 new messages