Announcement

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

    Can I set ListGrid cell align?

    EDIT: found it 5 mins after posting this, sorry. Get the listgridfields out, set alignment on them individually.

    We have a list grid with cells. Example:
    Code:
    <td style="padding-top: 0px; padding-bottom: 0px; width: 30px; overflow: hidden; white-space: nowrap;" class="cCell" height="29" align="left"><div role="presentation" cellclipdiv="true" style="overflow:hidden;;white-space:nowrap;text-overflow:ellipsis;WIDTH:26px;"><div style="height:30px"><img src="http://127.0.0.1:8888/images/status/web.png" tabindex="-1" suppress="TRUE" draggable="true" width="20" height="20" border="0" align="TEXTTOP"><img src="images/blank.gif" style=" width:20px;height:10px;display: block" tabindex="-1"></div></div></td>
    I would like to change the "align" attribute of the td, but I cannot seem to do it. Looking at your docs, there's supposed to be a "getCellAlign"-method in ListGrid that I'd thought I could override and always return "center", but this method doesn't seem to exist in Java?

    I'm sure it's simple, hoping I can get a pointer.

    Cheers
    Last edited by mathias; 7 Jun 2023, 03:16.

    #2
    ListGrid.getCellAlign() isn't exposed in SGWT right now - but you should be able to use ListGridField.get/setCellAlign(Alignment).

    Comment

    Working...
    X