Results 1 to 3 of 3

Thread: Dataview component & selectfield

  1. #1
    Sencha Premium Member
    Join Date
    Oct 2012
    Location
    Antibes
    Posts
    93
    Answers
    7

    Default Dataview component & selectfield

    Hello , i'm trying to add a selectfield in my dataview, but i don't manage to do it

    here's my code so far

    Code:
    Ext.define('CWFSE.view.ListeSelectField', {
        extend: 'Ext.dataview.component.DataItem',
        xtype: 'mylistSelct',
        config: {
            padding: 10,
            layout: {
                type: 'hbox'
            },
            defaults: {
                margin: 5
            },
            items: [{
                 xtype: 'selectfield',
                            label: 'Civilit',
                            labelWidth: '20%',
                            labelWrap: true,
                            name: 'civilite',
                            flex: 1,
                            options: [
                                {
                                    text: 'Domicile',
                                    value: '1'
                                },
                                {
                                    text: 'Mobile',
                                    value: '2'
                                },
                                {
                                    text: 'Bureau',
                                    value: '3'
                                },
                                {
                                    text: 'Fax',
                                    value: '4'
                                },
                                {
                                    text: 'SMS',
                                    value: '5'
                                }
                                ]
            }, {
                xtype: 'component',
                flex: 1,
                html: 'PHO_NBR',
                itemId: 'textCmp'
            }]
        },
        updateRecord: function(record) {
            var me = this;
    
    
            me.down('#textCmp').setHtml(record.get('PHO_NBR'));
    
    
            me.callParent(arguments);
        }
    });
    i bump in this message

    Uncaught TypeError: item.getHeader is not a function
    someone have an idea ?

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Do you have a grid in your application? This sounds like an issue affecting 2.4.2. Are you able to test against a 2.4.3 nightly?

  3. #3
    Sencha Premium Member
    Join Date
    Oct 2012
    Location
    Antibes
    Posts
    93
    Answers
    7

    Default

    well , i haven't , i created a itemTpl with option instead

Similar Threads

  1. How to show the selectfield listpanel based on component???
    By srirammadduri in forum Sencha Touch 2.x: Q&A
    Replies: 5
    Last Post: 19 Feb 2014, 1:21 AM
  2. Replies: 1
    Last Post: 29 May 2013, 2:31 PM
  3. Selectfield picker component v overlay list scrolling
    By KeithBurns in forum Sencha Architect 2.x: Help & Discussions
    Replies: 2
    Last Post: 11 Oct 2012, 3:19 PM
  4. Replies: 2
    Last Post: 12 Jan 2012, 9:52 AM

Tags for this Thread

Posting Permissions

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