Announcement

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

    SmartGWT.Mobile: TableView and RecordFormatter

    I am trying to create a SmartGWT.Mobile TableView with custom record formatting, since I would like to have part of the table content right-aligned.

    I successfully created the TableView, but it seems to ignore my RecordFormatter:

    Code:
        tableView = new TableView();
        tableView.setTitleField("title");
        tableView.setShowNavigation(false);
        tableView.setCanSelectRecords(true);
        tableView.setTableMode(TableView.TableMode.GROUPED);
        RecordFormatter recordFormatter = new RecordFormatter() {
          @Override
          public String format(Record record) {
            return "TEST";
          }
        };
        tableView.setRecordFormatter(recordFormatter);
    Anyone could help with some sample code? Thanks.

    #2
    Probably I could do is by setting directly HTML as the cell value, e.g.

    Code:
    Record record = new Record("ABC", "<p align=\"right\">"+"DEF"+"</p>");
    Is this the recommended way to do custom formatting?

    Comment

    Working...
    X