Results 1 to 4 of 4

Thread: [CLOSED] [1.2.3] Problem using ComboBox as an editor in the grid

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    877
    Vote Rating
    1
      0  

    Default [CLOSED] [1.2.3] Problem using ComboBox as an editor in the grid

    Hi.

    While using a ComboBox as an editor in the EditorGrid, a ClassCastException occurs in this line:

    (Editor.java - startEdit method)
    Code:
    field.setValue(preProcessValue(value));
    My guess is that, when using ComboBox, we should assign the value using setRawValue.

    So it would be like this:
    Code:
    if (field instanceof ComboBox) {
      field.setRawValue(preProcessValue(value));
    } else {
      field.setValue(preProcessValue(value));
    }
    Is someone able to recreate this?

    Regards,
    Michel.

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    132
      0  

    Default

    This is no bug. You should use the help forum and you should also check the examples how to handle comboboxes in editors.

  3. #3
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    877
    Vote Rating
    1
      0  

    Default

    Hi.

    You are right, sorry about that, my mistake.

    Just in case, if someone else stops here and is having the same problem as me, just override the preProcessValue and postProcessValue methods of the CellEditor class and return your model.

    Regards,
    Michel.

  4. #4
    Sencha User
    Join Date
    Apr 2011
    Posts
    28
    Vote Rating
    0
      0  

    Default

    Hi,

    I have got general problems with correctly implementing the preProcessValue and postProcessValue methods.
    How are those to be implemented? The examples I found only had a SIMPLEComboBox but not ComboBox<D> with an own BaseModelData D.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •