Results 1 to 3 of 3

Thread: Howto setup title of fieldset from record

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User kostysh's Avatar
    Join Date
    Nov 2011
    Location
    Odessa, Ukraine
    Posts
    176
    Vote Rating
    20
      0  

    Default Howto setup title of fieldset from record

    Hi,
    I have a Ext.form.Panel with 'fieldset' item inside. I need setup 'title' of this 'fieldset' from panel data record.
    Fields inside 'fieldset' setted automaticaly (by name template), but I dont know how to setup 'title' in same way.

  2. #2
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Location
    Italy
    Posts
    1,395
    Vote Rating
    24
      0  

    Default

    Hi kostysh.
    Unfortunately there is no way to set a fieldset title in the same wy of loading the form fields by the "setRecord" function.
    However, you can achieve that as follow:
    Suppose you have a "title" field in your record which should be set as the Title of your fieldset.
    At this point you should only get your field set component inside your form and set its title using the "title" record value.

    Code:
    myForm.getComponent('myFieldset').setTitle(record.get('title'));
    Hope this helps.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    Owner at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    https://github.com/AndreaCammarata/TUX


  3. #3
    Sencha User kostysh's Avatar
    Join Date
    Nov 2011
    Location
    Odessa, Ukraine
    Posts
    176
    Vote Rating
    20
      0  

    Default

    Thanks, it works!

Posting Permissions

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