1. #1
    Ext User
    Join Date
    Feb 2008
    Posts
    20
    Vote Rating
    0
    mleework is on a distinguished road

      0  

    Default Display ComboBox in EditorGridPanel

    Display ComboBox in EditorGridPanel


    I got ComboBox to work in EditorGridPanel. The next thing I would like to do is to have the ComboBox to show up when the EditorGridPanel first render rather than when I click the cell, then the ComboBox show up. Is there any parameter I need to specify, or function to overwrite to implement this?

  2. #2
    Sencha User catacaustic's Avatar
    Join Date
    Jul 2007
    Location
    "A Land Down Under"
    Posts
    618
    Vote Rating
    1
    catacaustic is on a distinguished road

      0  

    Default


    If you've got an EditorGridPanel, which instance of the ComboBox do you want to actually show? I'm going to assume that there's likely to be more then a single row in the grid, so do you want to show the first, last, one in the middle, or all? (just to note... you won't be able to show 'all' of them at the same time as it's a single object re-used for each row)

    To show one, Set up a listener for the 'show' event on the grid panel. Then you can use the grids column model to display the cells editor for whichever single cell you want.
    'Once again, fortune vomits on my eiderdown'
    - Edmund Blackadder

  3. #3
    Ext User
    Join Date
    Feb 2008
    Posts
    20
    Vote Rating
    0
    mleework is on a distinguished road

      0  

    Default


    In my case, my EditorGridPanel holds the result from a search. Thus, the combobox should display the value return from search. Some of my colums are editable and some are not. With combobox show up when first render convey the idea that this column is editable rather to let the user try or guess it.

  4. #4
    Sencha User catacaustic's Avatar
    Join Date
    Jul 2007
    Location
    "A Land Down Under"
    Posts
    618
    Vote Rating
    1
    catacaustic is on a distinguished road

      0  

    Default


    Thats fine. You can do that the way I've suggested. But you'll still only ever be able to show one combo box at once, so hopefully this will be enough for you.

    Another sugestionis to have another visual way of showing users that the field is editable, like a special class or colour for the text in it? Might make it easier.
    'Once again, fortune vomits on my eiderdown'
    - Edmund Blackadder

  5. #5
    Ext User
    Join Date
    Feb 2008
    Posts
    20
    Vote Rating
    0
    mleework is on a distinguished road

      0  

    Default


    I am pretty new for Ext JS. Do you mind show me some code, especailly the part "grids column model to display the cells editor". I am a little comfused about that part because I have already set it up when I first render the grid. Do you mean don't set up the combobox editor until grid 'show' event. Please advise.

  6. #6
    Ext User
    Join Date
    Nov 2007
    Posts
    56
    Vote Rating
    0
    Gordon76 is on a distinguished road

      0  

    Default


    Check the API docs for

    Ext.grid.EditorGridPanel.render event
    Ext.grid.EditorGridPanel.listeners property
    Ext.grid.EditorGridPanel.startEditing() method

    This should give you everything you need.

  7. #7
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    I'd probably go the format editable regions differently route, but another option might be to do as cat has suggested while using http://extjs.com/deploy/dev/docs/?cl...r=startEditing

  8. #8
    Sencha User emredagli's Avatar
    Join Date
    Jun 2008
    Posts
    300
    Vote Rating
    0
    emredagli is on a distinguished road

      0  

    Default Similar problem

    Similar problem


    Dear mjlecomte,
    I have the simillar problem, I want to show all comboboxes in the EditorGridPanel.
    When it is first created I use startEditing() to show all combobox. But When I click combo, the rest of them became invisible.

    How can I make comboboxs become visible.

    thanks for your attention.

  9. #9
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    Quote Originally Posted by emredagli View Post
    Dear mjlecomte,
    I have the simillar problem, I want to show all comboboxes in the EditorGridPanel.
    When it is first created I use startEditing() to show all combobox. But When I click combo, the rest of them became invisible.

    How can I make comboboxs become visible.

    thanks for your attention.
    My response to this would only to say similar to what catacaustic has already mentioned above.