Results 1 to 5 of 5

Thread: Adding drop down (combo box) in panel header

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Location
    India
    Posts
    9

    Default Adding drop down (combo box) in panel header

    Hi All,
    I have a panel. I want to add a drop down to its header. I am following MVC architecture. I searched the forum regarding this concern and was able to find one. But that wasn't in MVC. When I try to add the same code in MVC it doesn't work.

    Regards

    Soumya

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    585

    Default

    Why does using the MVC affect it? Could you post your code?

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    28

    Default

    Sorry, but I did not understand a single bit, but I think, you need just create single view for that combobox and create your own xtype with
    Code:
    alias: 'mynewxtype'
    in view itself. So, in main layout defining aka Viewport.js you just add this item and you won't break any MVC rule I guess.

  4. #4
    Sencha User
    Join Date
    Aug 2012
    Location
    India
    Posts
    9

    Default

    initComponent: function () {
    this.header.add({
    xtype:
    'combobox',
    text:
    'Test',
    align:
    'left'
    });
    this.store = 'Home.UnreadAlertStore';
    this.columns = [
    {
    text :
    'Company',
    flex : 1,
    sortable :
    false,
    dataIndex:
    'company'

    },
    {
    text :
    'Price',
    width : 75,
    sortable :
    true,
    renderer :
    'usMoney',
    dataIndex:
    'price'

    },
    {
    text :
    'Change',
    width : 75,
    sortable :
    true,
    renderer : change,
    dataIndex:
    'change'

    },
    {
    text :
    '% Change',
    width : 75,
    sortable :
    true,
    renderer : pctChange,
    dataIndex:
    'pctChange'

    },
    {
    text :
    'Last Updated',
    width : 85,
    sortable :
    true,
    renderer : Ext.util.Format.dateRenderer(
    'm/d/Y'),
    dataIndex:
    'lastChange'

    }


    ?
    ];
    this.callParent(arguments);
    }







    Here is the sample code that i am using to display a dropdown in the Grid Header.


    this.header.add({
    xtype:
    'combobox',
    text:
    'Test',
    align:
    'left'

    }); // with MVC



    grid.header.add({
    xtype:
    'combobox',
    labelWidth: 35,
    fieldLabel:
    'Test'

    }) // without MVC


    I want to display the Dropdown with the field name as Test just beside the Grid title "Array Grid" as shown in the attachment using MVC.


    Attached Images Attached Images

  5. #5

    Default

    Even im facing the same issue. Any suggestions will be appreciated.

Posting Permissions

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