Announcement

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

    Grid with some vertically united cells

    Hi all,

    What would be the best way to create a grid which may contain several vertically united fields? (like HTML ROWSPAN)

    (I can not to this with ListGrid, can I?)

    Thank you for your help!

    #2
    This is supported by the CubeGrid, which has not yet been ported to SmartGWT.

    It's possible to emulate it by conditionally eliminating the borders between cells via getCellCSSText(). This doesn't support centering text within a spanning cell, of course.

    Comment


      #3
      Originally posted by Isomorphic
      This is supported by the CubeGrid, which has not yet been ported to SmartGWT.

      It's possible to emulate it by conditionally eliminating the borders between cells via getCellCSSText(). This doesn't support centering text within a spanning cell, of course.
      If I understand this right, the mentioned getCellCSSText() method is a getter. How do I set anything using this? The usual "setCellCSSText()" (which I would expect to configure this) does not seem to exist.

      * * *

      If I decide to build up my component from the "ground" instead of customizing a ListGrid (which I might do, because the expected behavior is not really ListGrid-ish, anyway) what component should I start from?

      Comment


        #4
        Originally posted by csillag
        If I decide to build up my component from the "ground" instead of customizing a ListGrid (which I might do, because the expected behavior is not really ListGrid-ish, anyway) what component should I start from?
        In lack of a better option, I plan to go with GWT's FlexTable. Does this make sense?

        Comment


          #5
          getCellCSSText() can be overridden when you create the ListGrid. So:
          Code:
          protected String getCellCSSText(ListGridRecord record, int rowNum, int colNum) {
             if((rowNum > 0 && rowNum < 5) && colNum ==1)
                 return "noTopBottomBorderStyle";
          
             return super.getCellCSSText(record, rowNum,colNum);
          }
          or whatever your trying to get exactly. You can embed GWT widgets though I have been able to to get most my needs met with tweaks to ListGrid like this.

          Comment

          Working...
          X