Announcement

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

    multi line content is shown less nicely in grid row

    Hi,
    I have a grid with:
    enforceVClipping: true,
    fixedRecordHeights: true,

    When there is multi-line content it is shown a bit strange, I would like only the first line to be shown and not the top-aligned approach.

    Is this something I can influence with existing properties/styles?

    gr. Martin
    Attached Files

    #2
    You could set the whole grid to top-align and then add top padding to restore centering for single-line rows.

    Comment


      #3
      Hi,
      I checked the source code but with fixedrowheight, padding-top: 0px is set on the cell in the gridrenderer:
      this.fixedRowHeights ? "padding-top:0px;padding-bottom:0px;"

      See the resulting html in the attached screenshot. So if fixedrowheights is false, how can I enforce the same row size for all rows but include padding myself?

      gr. Martin
      Attached Files

      Comment


        #4
        You wanted tall values to be clipped, so don't set fixedRowHeights:false.

        Comment


          #5
          Yes, indeed, but as I noted, if fixedRowHeights are true then Smartclient forces a padding of 0px. So I can't follow your advice to do top-align and set padding.

          What should I do in case fixedRowHeights is true and I want to set padding-top manually and not at 0px?

          gr. Martin

          Comment


            #6
            This is actually an intentional choice - when the browser clips it chooses to retain the padding and clip the content, which is usually a bad choice for content where two lines or a complete image would fit fine if the padding were reduced for just that cell.

            We'd recommend adjusting cell height to either show one line of content with less padding, or adjusting it to fit two lines of content comfortably.

            An alternative would be not to inject <br>s into your content, so that it doesn't wrap.

            Comment


              #7
              Thanks for your reply, I now understand the rational behind this approach, it is only a pity that it is difficult/impossible to override this through a css, that's all.

              gr. Martin

              Comment

              Working...
              X