Announcement

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

    change font for listGridField

    Hello,

    how can I change the font for a listGridField??

    Thanks aemik

    #2
    Use a cell formatter and add the text within a span with a certain CSS class name. In your CSS declaration, specify the desired styling / font for the particular CSS class.

    If you need to conditionally change the font for certain cells depending on their value, have a look at this sample.

    Sanjiv

    Comment


      #3
      Using the getCellCSSText override as demonstrated in the Grid Appearance Hilite (Add) is the preferred way and is more efficient.

      Comment


        #4
        Hi,

        Originally posted by smartgwt.dev
        Using the getCellCSSText override as demonstrated in the Grid Appearance Hilite (Add) is the preferred way and is more efficient.
        Is there also a way to set a CSS class instead of hardcoding the style,
        or is that only possible via sjivan's proposed option?

        Originally posted by sjivan
        Use a cell formatter and add the text within a span with a certain CSS class name. In your CSS declaration, specify the desired styling / font for the particular CSS class.

        Comment


          #5
          You can override String ListGrid.getBaseStyle(ListGridRecord record, int rowNum, int colNum)
          It returns the name of the CSS class to use for that style.

          Comment

          Working...
          X