Announcement

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

    Multiple custom dates over listgrid

    Hi,

    I am having listgrid with 3 date columns.
    I want them to display my custom date formats instead of system defined.

    For customizing date, i am using below code

    Code:
    DateUtil.setShortDateDisplayFormatter(new DateDisplayFormatter() {
                public String format(Date date) {
                    if(date == null) {
                        return null;
                    }
                    // set the date format as per the WWF date preference
                    DateTimeFormat dateFormatter = DateTimeFormat.getFormat("dd.MM.yy hh:mm:ss z");
                    return dateFormatter.format(date);
                }
            });
    This is applying above custome dateformat to all date fields over listgrid.
    But i want to show three different custom dateformats for listgrid, like

    Created_Dt in dd.MM.yy hh:mm:ss z
    Modified_Dt in dd.MM.yy hh:mm:ss
    Valid_Dt in dd.MM.yy

    Thanks,
    Bala

    #2
    Use ListGridField.setCellFormatter() or ListGridField.setDateFormatter(..)

    Comment

    Working...
    X