1. #21
    Sencha User
    Join Date
    Dec 2010
    Posts
    9
    Vote Rating
    0
    colinm is on a distinguished road

      0  

    Default


    Hi,
    i wondered if someone if it is possible to create a Combobox in a grid but with a different store for each combobox.
    so for example the list of traductions of a book ... this depends of each book ....
    so far, it seems quite difficult to me .. but since extjs rocks ... it should be right?
    any thoughts/links/solutions?

  2. #22
    Ext JS Premium Member
    Join Date
    Oct 2007
    Location
    Herndon, VA
    Posts
    265
    Vote Rating
    3
    durlabh is on a distinguished road

      0  

    Default


    You should be able to change the store data (or combobox itself) by listening to beforeedit event of the EditorGrid.

  3. #23
    Sencha User
    Join Date
    Dec 2010
    Posts
    9
    Vote Rating
    0
    colinm is on a distinguished road

      0  

    Default


    thx .. it sounds logic .. i will try tomorrow ... just if you know on top of your head .. is it possible to have the combobox displaying the down arrow all the time (so far, it seems that i am obliged to double click on the cell to have the combobox option coming out)

    i will let you know if i succeed with my combobox
    thx again

  4. #24
    Ext JS Premium Member
    Join Date
    Oct 2007
    Location
    Herndon, VA
    Posts
    265
    Vote Rating
    3
    durlabh is on a distinguished road

      0  

    Default


    For changing the editor, use setEditor method in beforeedit event. To give it a look of combobox being active always, you can use a renderer and return a class name that makes the rendered area look like a dropdown. Also, you can change clickstoedit property to make it single click edit instead of double click.

  5. #25
    Sencha User
    Join Date
    Dec 2010
    Posts
    9
    Vote Rating
    0
    colinm is on a distinguished road

      0  

    Default


    thx again ..
    i am thinking again about my previous post (having a combobox displaying a 'row contextual store') .. well i am not sure your previous answer works .. can you extend about the following problem:
    when the grid is displayed you want to have a default view in each combo to be different .. for the example of a book list, each book as a different translator list and if you click on a combo the displayed list is different ..
    -> to have a different displayed list, i agree than changing the store in the beforeedit method should do it ... but to have different values per default in each store .. would you suggest to first create a store with all the default values?

  6. #26
    Sencha User
    Join Date
    Apr 2011
    Posts
    5
    Vote Rating
    0
    logive is on a distinguished road

      0  

    Cool funny enough it worked for my remote comboboxes,there are some place modified

    funny enough it worked for my remote comboboxes,there are some place modified


    funny enough it worked for my remote comboboxes,there are some place modified

    Ext.ns("Ext.ux.renderer");
    Ext.ux.renderer.ComboRenderer = function(options) {
    var value = options.value;
    var combo = options.combo;
    var returnValue = value;
    var valueField = combo.valueField;

    var idx = combo.store.findBy(function(record) {
    if(record.get(valueField) == value) {
    returnValue = record.get(combo.displayField);
    return true;
    }
    });

    // This is our application specific and might need to be removed for your apps
    if(idx < 0 && value == 0) {
    returnValue = '';
    }

    return returnValue;
    };
    Ext.ux.renderer.Combo = function(combo) {
    return function(value, meta, record) {
    return Ext.ux.renderer.ComboRenderer({value: value, meta: meta, record: record, combo: combo});
    };
    }
    ------------------------------------------------------
    {
    header: '币制',
    dataIndex: 'rptype',
    sortable: true,
    width: 95,
    editor: rptypeFun("rptype",'','rpTypeAction_listAll.do'),
    renderer:Ext.ux.renderer.Combo(Ext.getCmp('rptype'))
    },

  7. #27
    Sencha User
    Join Date
    Mar 2011
    Posts
    208
    Vote Rating
    0
    bee is on a distinguished road

      0  

    Default combobox for editorgridpanel

    combobox for editorgridpanel


    hi guys, in many threads the topic was discussed on combo box, and I referred all those steps, but I am getting undefined combo box on editor grid panel. can anyone suggest me the solution ?

  8. #28
    Sencha User
    Join Date
    Sep 2011
    Posts
    3
    Vote Rating
    0
    rajivchaudhary_it is on a distinguished road

      0  

    Default Combo in a grid on select of combo want to change value of corresponding row in grid

    Combo in a grid on select of combo want to change value of corresponding row in grid


    Hi ,
    I Have a grid with the combo box and other columns , i want to change the value of other columns when i changed the selection of my combo.

    example will be highly appreciable

  9. #29
    Sencha User
    Join Date
    Sep 2011
    Posts
    3
    Vote Rating
    0
    rajivchaudhary_it is on a distinguished road

      0  

    Default


    Thanks Guys , my question is already answered in this post .. didt see it properly

  10. #30
    Sencha User
    Join Date
    Dec 2013
    Location
    Germantown
    Posts
    1
    Vote Rating
    0
    Maurod69 is on a distinguished road

      0  

    Default ComboBox for Grid not showing as a combo until user clicks it

    ComboBox for Grid not showing as a combo until user clicks it


    Hello I am fairly new to Extjs and I am trying to have a couple of comboboxes in a grid panel. We have tried a couple of ways to accomplish this with no lock. We have the two columns with a editor and we define the combobox inside. The problem as many people have reported is that the combo does not appear as a combobox for the user when the page is loaded and only when the user clicks on the cell then the cell becomes a dropdown.
    Here is a code snipet of what I have
    return {
    extend: 'Ext.grid.Panel'
    columns: [
    {
    dataIndex: 'whatever',
    text: 'blabla',
    editor: {
    xtype: 'combobox',
    store: 'mystore',
    queryMode: 'local',
    renderer: function (value, metaData, record, rowIndex, colIndex, store, view, self) {

    this.columns[1].getEditor().store = Ext.create('Ext.data.Store', {
    fields: ['value', 'Label'],
    data: value
    })
    return value[0].Label;
    }
    }
    },


    Can someone shed some light? I have read the example with the helper but am not sure how to apply it.