PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Edit datagrid values in another form

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Structures
View previous topic :: View next topic  
Author Message
Diesel9a1



Joined: 28 Nov 2007
Posts: 1

PostPosted: Wed Nov 28, 2007 2:38 pm    Post subject: Edit datagrid values in another form Reply with quote

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
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1051

PostPosted: Wed Nov 28, 2007 7:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Structures All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software