Announcement

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

    ListGrid setData setAutoFitWidth

    v8.3p_2013-02-08/LGPL Development Only (built 2013-02-08)

    I use listGrid.setData(dataModel); with dataModel = new RecordList();
    I also populate dataModel with data using Record record = dataModel.get(index); and record.setAttribute(...).

    In this case the listGrid does not behave as I expect when I use ListGridField.setAutoFitWidth(true).

    Does anybody know how can I make my listGrid automatically fit the columns widths according to the data?

    Thanks in advance.

    #2
    AutoFit

    I think this is the function you want:

    http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/widgets/grid/ListGrid.html#setAutoFitData(com.smartgwt.client.types.Autofit)

    Using Autofit.HORIZONTAL

    Comment


      #3
      I found http://forums.smartclient.com/showthread.php?t=14720&highlight=ListGrid+autoFitField. And this recommendation works. Namely - ListGrid.autoFitFields()

      Comment

      Working...
      X