Announcement

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

    Record components in ListGrid being overwritten by normal cell contents

    Hi,

    I have a ListGrid with createRecordComponent() overridden. I want it to render a column with components in the cells (obviously). But, both the normal cell contents and the component are showing up in the column (one overwriting the other).

    The only way to stop this happening seems to be to set the ListGridField name to something other than the DataSourceField name, so that it does not show up natively. Then, I can grab the field contents via record.getAttribute() and display it in the component. However, this seems like a hack, and not best practice.

    Is there something I have to set so I can avoid this workaround?

    Thanks in advance

    PS I am using SGWT 2.4 and GWT 2

    #2
    I figured a less hacky way to do it, so that I can still render the component off of the field name: use a CellFormatter that just returns null to suppress the normal output for that column. It still doesn't seem like you should have to do that though - any cell with a component should automatically not try to render itself over the top of the component.

    Is there a better way?

    Thanks

    Comment

    Working...
    X