[CLOSED] Update records subcollection with set() method?

  1. #1

    [CLOSED] Update records subcollection with set() method?

    Hello,


    I'm having problems when trying to update a record wich contains a subcollection.

    var record = flowPanel_targetStore.getAt(i);
                        record.data.FlowBaseCollection[j].Role = flowBaseDTO.Role;
                        record.data.FlowBaseCollection[j].RoleName = flowBaseDTO.RoleName;
    the above code works but the records status (modifieid, dirty....) wont update.

    So how can I use the set method in this case?
    The set method wants the name of the property as param, like:

     record.set('FlowBaseCollection[j].Role',  flowBaseDTO.Role);
    But the set method can't resolve that parameter so it will just add a new variable to the record...

    How to solve this?

    Thanks

    Patrik G
    Last edited by Daniil; Oct 28, 2010 at 3:05 PM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2
    Hi Patrick,

    Please use [CODE ] tags.

    See #2 here
    http://forums.ext.net/showthread.php...ing-New-Topics

    Now, the question.

    I would suggest you to use the Record's markDirty method().

    http://dev.sencha.com/deploy/dev/docs/?class=Ext.data.Record&member=markDirty
    Last edited by geoffrey.mcgill; Feb 20, 2011 at 12:22 PM.

Similar Threads

  1. [CLOSED] Update ASP.Net Controls during DirectEvent/Method
    By alexkay in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 19, 2011, 6:23 AM
  2. [CLOSED] update() method for innerHTML change on v1.0
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 19, 2010, 12:54 PM
  3. Update ASP.net controls via Direct Method
    By glenh in forum 1.x Help
    Replies: 4
    Last Post: Sep 14, 2010, 5:38 PM
  4. [CLOSED] Update a nodes iconcls and cls properties in direct method.
    By Labyrinth in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 02, 2010, 1:29 PM
  5. Problem after update records
    By Argons in forum 1.x Help
    Replies: 1
    Last Post: Aug 06, 2009, 1:36 PM

Posting Permissions