|
|
| |
1. addparam ex 9 to work with fields |
|
Reply |
|
|
 prasmalla | 2010-01-22 18:36:36 |
first off great work guys, thanks for doing this.
i am trying to replicate ex9 but instead of selecting tables, i want it to work with a primary key field, which i can select from the drop down menu or search with a text box, and it would create a form view for that individual record. please guide me through this. thanks again. |
| |
2. Re: addparam ex 9 to work with fields |
|
Reply |
|
|
 dd | 2010-01-24 21:15:51 - In reply to message 1 from prasmalla |
Hi prasmalla,
Tx for the positive words. About your question: drasticgrid offers in-line editing of fields, not editing via forms. So, we do not understand exactly what you want the addparams example to do.
Maybe with more info, we can help,
dd |
| |
3. Re: addparam ex 9 to work with fields |
|
Reply |
|
|
 David M | 2010-06-17 20:45:57 - In reply to message 1 from prasmalla |
prasmalla,
I found DrasticData as I was looking for a data-grid package to use (I'm pretty poor at UI - I need all the help I can get!). My primary need was to be able to select a sub-set of the entire table... like your need.
So using the documentation from the site, I created a 'solution.' The whole solution is posted at:
http://dissectionbydavid.wordpress.com/2010/06/17/bending-dr ...
Short version is this:
1) create a new drop-down that shows unique, primary keys
2) alter the AJAX/javascript to use this new drop-down
3) alter the original class (per it's own comments/notes) to 'grab' the $_REQUEST being sent by step 2
4) extend the 'select()' function of the original class to SELECT * FROM $this->table WHERE YourPrimaryKeyHere = ‘$theVariableFromStep3’” . $this->orderbystr, ...
Personally, I ended up creating a new function that grabbed a list of unique primary-keys that I then used to create the drop-down in step 1 above. A quick-hack would be to create your own drop-down (that's what I show in the link above) of primary keys.
Hope that helps... heck, I hope you check back!
David
|
| |
4. Re: addparam ex 9 to work with fields |
|
Reply |
|
|
 dd | 2010-06-18 07:51:32 - In reply to message 3 from David M |
Hi David,
Nice work!
The way you used the addparams option of DrasticGrid is exactly the way the addparams option was intended to be used. Examplegrid 9 uses it to send the tablename, but you can use it to send any variable you need.
A small remark: we may extend drasticGrid with standard filtering functionality (any value of any column), if there are more people interested in it. If there more request we will get into that.
dd
|
| |
5. Re: addparam ex 9 to work with fields |
|
Reply |
|
|
|