Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Grid - fixedRecordHeights - hilites

    SmartGWT 2-5 (2011-10-26)
    or
    SmartClient 8.1 Eval (2011-11-09)
    Firefox 3.6.23+

    When fixedRecordHeights is set to FALSE and a configured Hilite has changed the "background-color" of a cell(s), a mouse "hover" does not change the background of the "hilighted" cell.

    Easiest way to reproduce the behavior:
    1) Use http://www.smartclient.com/#preDefinedHilites
    2) Select JS tab and modified recreateListGrid function:
    Code:
    ...
     dataSource: ds,
     autoFetchData: true,
         fixedRecordHeights: false,
     canAddFormulaFields: true,
     canAddSummaryFields: true,
    ...
    3) Click "Try It"
    4) Move mouse over ListGrid. Area and GDP cells with hilited background will not change color.
    Last edited by lextra; 9 Nov 2011, 05:18.

    #2
    This is a quirk of the way grid cells are styled and is something you can have either way.

    When cells remain at the default height and do not vary in height we use listGrid.normalBaseStyle. This style uses an image background gradient specified in CSS, so it supersedes the backgroundColor applied by the hilite.

    When cells can vary in size, a fixed gradient won't look right (CSS will not stretch it), so we switch to listGrid.tallBaseStyle automatically. This uses a simple solid color backgroundColor, so this is superseded by the highlight.

    We're not sure which behavior you want, but you can get either one by always using the non-image-based styling, or always using image-based styling, by setting listGrid.normalBaseStyle and/or listGrid.tallBaseStyle.

    Comment


      #3
      Thank you for your reply.

      We would like the same "mouse over" behavior that is seen when hilites are not being used. That is, a mouseover changes the background color of the entire row as seen in the PreDefinedHilites example. (or shows the gradient image if the cell height is fixed).

      I overrode getBaseStyle() and implemented the same tests that I had originally defined in the hilite criteria. Everything works as expected.

      Cheers
      Last edited by lextra; 10 Nov 2011, 09:37.

      Comment

      Working...
      X