Row specific information in the on_js_event

Discuss about features you want to see in the next versions of ApPHP DataGrid. Your requests and offers.

Moderators: ne_moj, zewa

toxus
Newbie
Newbie
Posts: 4
Joined: May 23rd, '09, 07:40

Row specific information in the on_js_event

Postby toxus » May 28th, '09, 06:54

Hi,

If we use the on_js_event we want to write a javascript that does specific actions on that row, but in the call we can not use the {0} or {[n]} parameters we can use if we use a link. We should be able to make a statement like:

Code: Select all

  "on_js_event" => "onclick='ajax.php?id={0}'",
  "field_key_0" => "field_id",


This should be translated in row specific javascript calls, where the {0} is translated into the value of the field_id.

The modification should be done in the GetFieldValueByType function on line

Code: Select all

    $on_js_event = $field_property_on_js_event;


Hope it will be in the next release


Best regards

Jaap van der Kreeft

administrator
Site Admin
Site Admin
Posts: 5938
Joined: Jan 7th, '09, 23:18
Contact:

Re: Row specific information in the on_js_event

Postby administrator » May 29th, '09, 21:59

You can write and use for yourself something like this:

Code: Select all

foreach($this->columns_edit_mode as $key => $val){                   
       $on_js_event = str_replace("{".$key."}", $row[$key], $on_js_event);
}

gold5466
Newbie
Newbie
Posts: 1
Joined: Sep 15th, '09, 09:29

Don't miss

Postby gold5466 » Sep 21st, '09, 14:42

This is seriously too good to be true.














aion cd key AOC cd key eve cd key EverQuest2 CD Keys ddo cd key
wow, aion, warhammer and aoc is very good!

purlut
Junior
Junior
Posts: 15
Joined: Jul 4th, '09, 04:30

Re: Row specific information in the on_js_event

Postby purlut » Sep 26th, '09, 05:16

This likes very nice.
In the proposed solution I see

foreach($this->columns_edit_mode as $key => $val){
$on_js_event = str_replace("{".$key."}", $row[$key], $on_js_event);
}


you threath columns in edit-mode ?

I would like have this kind in behaviour on some (not all columns) in view-mode.
When clicking an object-part in a specific column I would like opening a little window with info about the object.
Note, that info is not part of another table, it is data which is retrieve inside the object self (fe. exif-data in a JPEG)
So, i should have a method which fires a php with a parameter, some parameters of the object, or combination of some data from the same table

How should I do this ?

administrator
Site Admin
Site Admin
Posts: 5938
Joined: Jan 7th, '09, 23:18
Contact:

Re: Row specific information in the on_js_event

Postby administrator » Sep 26th, '09, 09:52

You can to implement it by yourself. The direction you've seen.
DataGrid is open-source product.
Just try to start... :)

BlackLocust
Senior
Senior
Posts: 34
Joined: Sep 16th, '09, 23:17

Re: Row specific information in the on_js_event

Postby BlackLocust » Feb 5th, '15, 21:08

In version 7.9.9, it appears that you've implemented something like this ... but more advanced ... with the function PrepareOnJSEventFields.

Does one of your examples provide instruction on using these options?

Thanks!

never mind! It appears to work exactly as the OP requested it to. :)


Return to “ApPHP DataGrid {future features}”