Project

General

Profile

Renderer for table

Added by PAL I almost 12 years ago

Hi, do we have anything like a table renderer in JWT,like we have in swing. I want my decimal numbers in table to be truncated to 3 decimal places while rendering, not while editing. Please help.

Thanks.


Replies (1)

RE: Renderer for table - Added by Wim Dumon almost 12 years ago

In your model class, override getData() for DisplayRole to return the number formatted as you wish. Leave the other roles to their default.

An alternative is to implement your own (specialization of a) WItemDelegate.

BR,

Wim.

    (1-1/1)