![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
Hi,
My client wanted me to create something that allows certain DataGrid to display to allow users to edit and update the database records. The only dilemma I am having here is how to actually create something from Flex's end to allow users update several rows of the database at once. Since everything in my datagrid would be defined as selectedItem whenever a user accesses the entry, how can I get Flex to recognize each of the updated variables while I update the database? Another question is, if I do something like dg2.selectedItem.id, it would only display the "selectedItem," and since I intend to loop every single one of the values as such in the datagrid to be updated, is it possible to do something like dg..id? I tried to do this, and I kept on getting errors. If anyone could refer me to some examples on how to get this to start, it would be great. Thanks in advance. Alice This is the current code I have: Attach Code: <mx:HTTPService id="save_scenario" method="POST" url="http://localhost/save_scenario.php" useProxy="false"> <mx:request xmlns=""> <scenario_name>{scenario_name}</scenario_name> <id_no>{dg2.selectedItem.id}</id_no> <region_name>{dg2.selectedItem.region_name}</regio n_name> <population>{dg2.selectedItem.population}</populat ion> <market>{dg2.selectedItem.market}</market> </mx:request> </mx:HTTPService> |
| Sponsored Links |
|
|||
|
Hummm....
I think you need to view the problem in steps. First I think you need to update one record at a time. So when a row is clicked on, it pops up an edit form. When submitted (button perhaps) it updated the data provider of the data grid: instant show of the change. At the same time, an HTTP service call is made to update the data base. There is no need to update the application with the new data from the server. Now back on the data grid the user can pick another record to update. Buttons could be added for Add, Delete and use click for Edit perhaps. |
|
|||
|
"alice_data" <webforumsuser@macromedia.com> wrote in message news:ggen1o$a3c$1@forums.macromedia.com... > Hi, > > My client wanted me to create something that allows certain DataGrid to > display to allow users to edit and update the database records. The only > dilemma I am having here is how to actually create something from Flex's > end to > allow users update several rows of the database at once. Since everything > in my > datagrid would be defined as selectedItem whenever a user accesses the > entry, > how can I get Flex to recognize each of the updated variables while I > update > the database? Add like an updated property to each item in the collection. Then set it when the user has changed something. Then filter the collection to items that have been updated and send them to the server. |
|
|||
|
Hi,
My dataGrid is editable in the first place, since there are not that many things in need of a new form. So, I think one of things I have to find out is how to pass the variables on to the HTTPService, When I declare the variable, dg.[i].id, is this how I should declare my variables that loop around for the PHP to process? Thanks in advance. Alice |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise