1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    16
    Vote Rating
    0
    vtu is on a distinguished road

      0  

    Default Answered: Issue w/ dynamic grid with combobox columns

    Answered: Issue w/ dynamic grid with combobox columns


    Hi, I'm using extjs 4.1 final. I'm creating dynamic grids using the reconfigure method. A couple of my columns need to be a combobox so I have an event listener for beforedit, which in this case checks which column it is, if its the correct column, it sets the column editor to a combobox and the combobox is linked to a store. The issue I'm having is the first time the grid is configured, the comboboxes work fine. I can select the cells within the columns that I defined as a combobox and I can select the values. But once I reconfigure the grid, there is an issue w/ the comboboxes. When I click on a column w/ the comboboxes, the dropdown gets rendered out of place and I can't select the values. I get an error stating "Uncaught TypeError: Cannot read property 'offsetHeight' of undefined ext-all-debug.js:16417"

    combobox.jpg
    I'm not sure if its a bug or it's an issue w/ the way I'm implementing it. Any help would be great. Thanks in advance.

  2. comment out: id: 'id', see if this helps.

    Scott.

  3. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Answers
    656
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Do you create a new instance of the combo each time you reconfigure?
    Does the combo each time? console.log(combo) after reconfig?

    Regards,
    Scott.

  4. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    16
    Vote Rating
    0
    vtu is on a distinguished road

      0  

    Default


    Quote Originally Posted by scottmartin View Post
    Do you create a new instance of the combo each time you reconfigure?
    Does the combo each time? console.log(combo) after reconfig?

    Regards,
    Scott.
    I used the beforeedit event. What it does is it checks to see if its the column I want, if yes than it sets the column editor so if its a column that I want to be a combobox I do.
    event.column.setEditor({
    xtype: 'combobox',
    id: id,
    displayField: prop,
    valueField: prop,
    store: this.getMyStore(),
    queryMode: 'local',
    triggerAction: 'all',
    lastQuery: '',
    editable: true
    });

    I know this isn't efficient since I would be setting the editor every time I click on one of the combobox column cell's. But it works fine for the initial grid when I reconfigure it again this is when I run into an issue. I thought it would be fine since running the reconfigure would create new columns and get rid of the old editor settings.

  5. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Answers
    656
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    comment out: id: 'id', see if this helps.

    Scott.

  6. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    16
    Vote Rating
    0
    vtu is on a distinguished road

      0  

    Default


    Quote Originally Posted by scottmartin View Post
    comment out: id: 'id', see if this helps.

    Scott.
    Thanks Scott you helped me solve my issue. By getting rid of the id, I realized it was an error caused by me referencing that id and listening for the expand event. I was trying to link up my comboboxes, where the value of one box affects the other. I added my logic else where and am no longer listening for that event for that specific combobox id and it seems to work fine now. Thanks again

Thread Participants: 1

Tags for this Thread

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