Results 1 to 6 of 6

Thread: Grid - Styling - Problem

  1. #1
    Sencha User
    Join Date
    Jun 2014
    Posts
    6

    Default Answered: Grid - Styling - Problem

    Hi,
    We are close to buy ext js. We made an prototype for our app and are quite satisfied with the outcome.
    But we have a problem styling a GridCell.

    What we want:
    When a event from server is received we want to change the "icon" (backgroundimage) of the cell representing the state.

    What we tried:

    First we tried it with "Action Column" and the "getClass" function which work quiet well. But we noticed a problem, with focusing the grid. When for example the first row is selected, and we scroll down with the mouse wheel so that the selected item isn't shown any more - then leave the grid to focus another grid and afterwards cklick directly on the actionItem of the first Grid - it jumps up to the selected (first) row and doesn't enter the handler function of the action-item clicked. Wie tried to set "stopSelection" property to false but it didn't changed the miss-behavior. (preserveScrollPosition is also activated)

    Secondly we tried to handle it with a "default" column, and working with a renderer to set the "tdCls" to icon-class we want to show. And use the cell-click event to handle the action. At a first look everythings seemed to be ok, but we recognized later that when the style of the cell (row) currently selected is set by the renderer and you deselect this row afterwards, the background changes to the background before selection.

    Is there any possibility to avoid one of this two behaviors?

    thanks a lot!

  2. I see the problem and after testing both of these issues in 5.0.2 nightly builds, then seem to have been corrected.

    The release should be soon, but I do not have a public release date at this time,

    Scott.

  3. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    It would be easier if we had a small test case of your setup:
    https://fiddle.sencha.com/#home

    You should be able to use getClass. Are you using any buffering in your store/grid?

  4. #3
    Sencha User
    Join Date
    Jun 2014
    Posts
    6

    Default Reproduction

    https://fiddle.sencha.com/#fiddle/agj

    to reproduce it ... wait 5 seconds until both "detectors" in both grids are red. (red shield)

    then...

    first: select any other row except "Arbeitszimmer Fenster", in the "grid with normal column" - grid -> you can see that the icon changes to green shield, although the value of the data is "0". This is the second miss-behavior form my first post.

    second: scroll down to last row in the "grid with action column" - grid - without selecting it (for example by dragging down the scrollbar) , click anyhwere in the "grid with normal column" - grid and afterwards click directly on the action item of the last row in the "grid with action column" - grid. -> you can see that grid jumps up to the select row without entering the action handler. the is the first miss-behavior form my first post.

  5. #4
    Sencha User
    Join Date
    Jun 2014
    Posts
    6

    Default solution?

    Any suggestions?

  6. #5
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    I see the problem and after testing both of these issues in 5.0.2 nightly builds, then seem to have been corrected.

    The release should be soon, but I do not have a public release date at this time,

    Scott.

  7. #6
    Sencha User
    Join Date
    Jun 2014
    Posts
    6

    Default

    Thank you!

Tags for this Thread

Posting Permissions

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