Announcement

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

    ListGrid BaseStyle gets changed on Record Click.

    Hi,

    We are using smartgwt pro 3.0 version.

    In our app, we have overridden getBaseStyle method to set style for the rows as :

    @Override
    protected String getBaseStyle(ListGridRecord record, int rowNum, int colNum)
    {
    return "pending_hilite";
    }

    But,
    While a click is performed on the record or cell the style specified by the getBaseStyle is gone and vanished. Expectation is to keep the same style when a click is performed.

    Thanks In Advance

    #2
    At a guess what's happening here is that you're applying a base-style and the system is therefore applying the base style, plus some stateful suffixes.
    So if you roll over the row, you may be getting "Over" appended to the baseStyle name, and if you select the row, you may get "Selected" or "SelectedOver" applied.

    This behavior is documented under the "getCellStyle" method. You can get rid of it by setting showRollOver to false and disabling selection on your grid, for example, or you could specify the ListGridRecord "customStyle" attribute for a static custom style [not a base style, so will not have suffixes appended].

    If that doesn't seem to match what you're actually seeing in your application, please show us a sample we can run to see the problem in action

    Regards
    Isomorphic Software

    Comment

    Working...
    X