1. #1
    Sencha User lfs2008's Avatar
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    53
    Vote Rating
    1
    lfs2008 is on a distinguished road

      0  

    Question to use TreeGrid as a form component

    to use TreeGrid as a form component


    hi all!

    I would like to use Customised TreeGrid as form component
    I wrote TreeGrid.getValues() method based on chekboxes and inputs,
    but since it has GridView as proto - realisation seems vague to me.

    here is the link

    http://wap7.ru/folio/crud/PiggybackManager.html

    please share any ideas -
    1. how to make values it included in form.getForm().updateRecord(), form.getForm().getFieldValues()
    2. how to make it reusable with type 'treegridfield' - would be perfect

    thanks
    Last edited by lfs2008; 18 Jan 2012 at 7:55 AM. Reason: mispell

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,620
    Vote Rating
    817
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Set a breakpoint on updateRecord() and follow it to see how it gets the fields.

    To assign an xtype, you have to use Ext.reg('newxtype', classname);
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User lfs2008's Avatar
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    53
    Vote Rating
    1
    lfs2008 is on a distinguished road

      0  

    Question


    thanks.

    i am overriding updateRecord() now.

    But my idea is - to make Grid Component automatically observable by Form somehow and use getValue() method internally with no
    updateRecord hacks



  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,620
    Vote Rating
    817
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I never said override updateRecord... I said to follow the code execution to see how it gets a list of the fields and see how you can get a treegrid to be included as one of the fields.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User lfs2008's Avatar
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    53
    Vote Rating
    1
    lfs2008 is on a distinguished road

      0  

    Default


    update record calls form.getFieldValues()

    it uses this.items

    and my component is not there.

Thread Participants: 1

Tags for this Thread