Professional Web Applications Themes

Need update function for datagrid selected item - Macromedia Flex General Discussion

Hello -- I'm using CF+ Flex+ FDS to connect and modify data. I am building a form that info is entered into, and then inserted into my database using a the wizard CFCs to insert records. That data is then displayed in a datagrid with the rest of the data in the db. When I need to update the info, I select the record from the datagrid and it populates my update form fields. However this is as far as I can get. I do not know how to write the update function to take the changed values of the ...

  1. #1

    Default Need update function for datagrid selected item

    Hello -- I'm using CF+ Flex+ FDS to connect and modify data. I am building a
    form that info is entered into, and then inserted into my database using a the
    wizard CFCs to insert records. That data is then displayed in a datagrid with
    the rest of the data in the db. When I need to update the info, I select the
    record from the datagrid and it populates my update form fields. However this
    is as far as I can get. I do not know how to write the update function to take
    the changed values of the update form and update the db with these values.

    I know the datagrid has an edit feature, however the field I need to update is
    not going to be a column of this datagrid. So I need to do it via a form where
    I can assign a value to the field. Currently i am inserting and deleting
    records using dataServices with an arrayCollection. Any help on an update
    function would be great, thanks


    EvolvedDSM Guest

  2. #2

    Default Re: Need update function for datagrid selected item

    Have your form elements update the associated model (DG.selectedItem) field. On
    change is often good for this, or focusOut. Perhaps flag the item as modified,
    so that you can loop over the dataProvider to extract the modified rows.

    Then send the modified rows to the server as an ArrayCollection.

    Tracy

    ntsiii Guest

  3. #3

    Default Re: Need update function for datagrid selected item

    I do not know how to update based on the selected item though.

    Currently I'm adding items using a form which runs this:
    ds.createItem(entry);

    I'm deleting items using a button in the grid which runs this:
    ds.deleteItem(dg.selectedItem);

    So is there a ds.updateItem() type method?

    EvolvedDSM Guest

Similar Threads

  1. Datagrid remove item and update array
    By nrutter in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: May 6th, 02:51 PM
  2. Selected (CurrentCell) doesn´t update after i rebind a dataset to my datagrid?
    By Robert Pettersson in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: September 19th, 02:06 PM
  3. DataGrid item selected
    By kohinoor75 in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: September 6th, 04:06 PM
  4. How to set selected item in drop-down list in datagrid
    By Jos in forum ASP.NET Building Controls
    Replies: 0
    Last Post: August 20th, 07:46 AM
  5. Adding javascript function to update button in datagrid edit row
    By Andy Johns in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: November 28th, 04:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139