Login   Register  
PHP Classes
elePHPant
Icontem

Special processing a single row from the grid.

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      DrasticTools  >  All threads  >  Special processing a single row from the grid.  >  (Un) Subscribe thread alerts  
Subject:Special processing a single row from the grid.
Summary:Make changes without use of the inline editing feature.
Messages:2
Author:Terry Wysocki
Date:2012-12-21 18:52:38
Update:2013-01-05 21:36:14
 

  1. Special processing a single row from the grid.   Reply  
Picture of Terry Wysocki
Terry Wysocki
2012-12-21 18:52:38
I'd like to have the ability to do some processing of the selected row via a user defined button or operation. For example: date stamping, updated_by, etc.

Also, I'd like to fill in some fields with default values whenever anything in the row is edited.

Is there a way to do this?

  2. Re: Special processing a single row from the grid.   Reply  
Picture of dd
dd
2013-01-05 21:36:14 - In reply to message 1 from Terry Wysocki
Hi Terry,

The onclick event gives you the id of the record selected.
See example1 in the documentation how to use it:

onClick: function(id){thegrid.DefaultOnClick(id); alert('clicked on row with id = '+id)}

The id can be used to do any operation on the record you like (which need to be coded in php).

About the default values: the columns in a mySQL table can have default values, so in case of adding a row, it simply uses the defaults you defined in the definition of the table.

regards,

dd