1. #1
    Sencha Premium Member
    Join Date
    May 2013
    Posts
    17
    Vote Rating
    0
    sws is on a distinguished road

      0  

    Default Unanswered: Grid Header Widget Focus

    Unanswered: Grid Header Widget Focus


    Hi,
    Can anyone give me a suggestion on a problem I'm trying to solve please...

    I have a grid with a row nums column which has a ToolButton in the header. The button adds a row to the grid when clicked. Unfortunately there is a nasty side effect on blur events when using GridInlineEditing.

    Basically, if a new row is added while editing a row the combo box doesn't properly reset, and it takes 2 attempts to use the combo again. I've traced the problem to the blur event not being triggered properly.

    Demo code is available from Assembla.
    grid-add-issue.png

    Can anyone suggest how I might put a button in a column header that doesn't interfere with blur events?

    I've tried:
    - Putting an HTML widget in the header and responding to onClick
    - Putting a TextButton in the header
    - Focusing an external widget momentarily and using Scheduler to continue later

    Ideas:
    - More advanced 'simulated' focus operations
    - Placing the ToolButton over (but not in) the column header

    Thanks in advance if you can help.
    Pete

  2. #2
    Sencha Premium Member
    Join Date
    May 2013
    Posts
    17
    Vote Rating
    0
    sws is on a distinguished road

      0  

    Default


    I've come up with a workaround but it's not pretty...
    1. The column header now has an image widget displaying the 'plus' icon.
    2. When the mouse hovers over it a PopupPanel is displayed with the 'plusOver' icon.
    3. When the plusOver icon is clicked the combo box blur is triggered properly and subsequent edits work cleanly
    This is not in the demo code.

    It's also worth noting that calling GridInlineEditing.completeEditing() does not terminate edit mode properly.

Tags for this Thread