1. #1
    Ext User
    Join Date
    Jun 2007
    Vote Rating
    giovabal is on a distinguished road


    Question value instead of text in Combobox after selection

    value instead of text in Combobox after selection

    I have a Combobox, it uses a json store sending (id,name) couples for populating value and text
    when you click on the combo it shows all the right options (ie: store loads the right way)
    you select an option, still everything ok, showing the selected item text
    when combobox blurs it shows selected item value, not the text!

    it worth mentioning that this combobox lives in an editorgrid

    PHP Code:
    Ext.onReady(function() {
    conn     = new Ext.data.Connection({});

    listReader = new Ext.data.JsonReader({
    root         'items',
      }, [{
    name'id'}, {name'name'}]);

    famigliaStore = new Ext.data.Store({
    proxy : new Ext.data.HttpProxy({url'/load_list/Famiglia/'   method'GET'}),
    famcombo = new Ext.form.ComboBox({
    fieldname    'Famiglia',
    store        famigliaStore,
    typeAhead    true,
    lazyRender   true,
    setEditable  false,
    emptyText    'Famiglia...',
    displayField 'name',
    valueField   'id',
    hiddenName   'famiglia',
    autoLoad     true,

    cm = new Ext.grid.ColumnModel([
    header   "Famiglia",
    width    130,
    editor   : new Ext.grid.GridEditor(famcombo),

    cm.defaultSortable false;

    ds = new Ext.data.Store({
    proxy : new Ext.data.HttpProxy({url'/loadlist/'method'GET'}),
    reader: new Ext.data.JsonReader({
    root         'items',
        }, new 

    grid = new Ext.grid.EditorGrid('editor-grid', {
    ds              ds,
    cm              cm,
    enableCtxMenu   false,
    clicksToEdit    2,
    trackMouseOver  true,

    layout Ext.BorderLayout.create({
    center: {
    panels: [new Ext.GridPanel(grid)]


    any help?
    thank you

  2. #2
    Ext User 0xception's Avatar
    Join Date
    Apr 2007
    Vote Rating
    0xception is on a distinguished road



    I've run into the same problem. When you use a gridEditor with a ComboBox that has a displayField and a valueField the value field is displayed once a selection is made. I've attached a screenshot to show what it looks like. I'm sure there's a way to hack around it by catching events and going to change the raw value/display text of the grid, but it seems like this isn't the intended purpose.

    Not sure if you call this a bug or not, but maybe there's something we're missing... Anyone has any ideas how to fix this?

    EDIT: ... oops i didn't see that this was in the Ext-1.1 forum... i'm using 2.1, it seems from other threads the best/current method is to just create a render function for the column and build cell's rendered text from the value.
    Attached Images
    Last edited by 0xception; 1 May 2008 at 3:46 PM. Reason: Wrong thread

  3. #3

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi