 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Diesel9a1
Joined: 28 Nov 2007 Posts: 1
|
Posted: Wed Nov 28, 2007 2:38 pm Post subject: Edit datagrid values in another form |
|
|
I have a Datagrid displaying values from a database. Excellent!
I would like to be able to now click on one of the values of the fields (ie Username) and that users profile is then loaded into another form for editing purposes.
Also an option to delete the user would be beneficial.
Can anybody please point me in the right direction? What modules to use, where there may be a good demo etc...?
I used this to get me started.
http://www.samalyse.com/code/pear/dgdo/
so to use this sites example as my request, I would like to click on apples and edit the price and quantity either in that table, or in a new table. The apple might have other fields such as size, shape, colour for example, so it would be good to load the full apple profile into a new table for editing, then saving. An option to delete apples would also be required.
Cheers
Pete |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Wed Nov 28, 2007 7:44 pm Post subject: |
|
|
Your ideas are not directly supported by SDG.
Code for deleting a record needs to be written by the programmer currently, but we're planning to add support for this. (The DB_Table DataSource driver already has experimental support for this.)
To add events to a column (or a row) you can add attributes to the columns that do some JavaScript magic. Such an 'onclick' event could then trigger some JS code that uses AJAX to load an edit form.
You might want to have a look into the HTML_EditForm renderer and into our AJAX example (available in CVS or on the manual page for HTML_Table renderer). |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|