Results 1 to 2 of 2

Thread: combo remote store - form loadRecord()

  1. #1
    Sencha Premium User
    Join Date
    Mar 2017
    Posts
    9

    Default combo remote store - form loadRecord()

    We have a grid and a form.

    The form data will be loaded by on select of a grid record.

    Code:
    form.loadRecord(record[0]);
    The form has a combobox with a remote store.

    Code:
    {
        xtype : 'combo',
        fieldLabel : 'Location',
        viewModel : {
            type : 'locationModel'
        },
        bind : {
            store : '{locationStore}'
        },
        allowBlank : false,
        forceSelection : true,
        columnWidth : 1,
        name : 'locationId',
        itemId : 'cmbLocation',
        dataIndex : 'locationId',
        hiddenName : 'locationId',
        submitValue : true,
        displayField : 'locationName',
        valueField : 'locationId',
        queryMode : 'remote',
        matchFieldWidth : false,
        submitValue : true,
        multiSelect : false,
        minChars : 1,
        pageSize : 10,
        listConfig : {
            tpl : new Ext.XTemplate('<tpl for=".">',
                    '<div class="x-boundlist-item">',
                    '<b>{frontDeskId}({name})</b> </br>',
                    '{building}</br>', '</div>', '</tpl>'),
            width : 450
        }
    }
    The grid has only the locationId and the combobox suppose to show the locationName (displayField).

    Since the store of the combo is not loaded with the matching value, it cannot show the Name.

    Tried to override the setValue function to try to set the query value to the value of the grid and load the store, but it did not ended up in something usable.

    Somebody who has solved the problem ?

  2. #2
    Sencha Premium User
    Join Date
    Mar 2017
    Posts
    9

    Default

    I thought this is a common issue ? How is this supposed to be handled ? Buffered combos are usually for big data queries. To load the entire store seems not right to me ?

Similar Threads

  1. Grid to form binding with remote paginated combo store
    By hugo.brizard in forum Sencha Ext JS Q&A
    Replies: 1
    Last Post: 23 Jan 2015, 9:32 AM
  2. Replies: 4
    Last Post: 2 May 2012, 9:36 PM
  3. CheckBoxGroup + loadRecord + remote store
    By netsuo in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 18 Nov 2011, 11:59 AM
  4. Combo Box on form load, with remote json store and pagination
    By cpx in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 26 Sep 2011, 1:45 AM
  5. Set remote combo store with data from form load
    By smit_al in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 26 May 2009, 9:55 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
  •