Announcement

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

    ListGrid with DataSourceFields and ListGridFields

    Hey fellow smartGWT developers,

    I'm currently using smartGWT 2.0 LGPL, and I am trying to add a column of checkboxes to a ListGrid. I would like to add a ListGridField to the ListGrid, but the problem is that the ListGrid is currently using a DataSource.

    I realize that I could add a DataSourceField of FieldType.BOOLEAN, but I would prefer not to do this for two reasons:

    1. We do not really need the checkbox as part of the datasource, the checkbox is merely used for a multi-selection mechanism.

    2. We really wanted to use setCanToggle() for the checkbox (so that we can check the box with one click, instead of entering into edit mode, etc), which is only available (to my knowledge) for listGridFields, not DataSourceFields.

    If anyone knows of a good alternate solution, it would be greatly appreciated.

    Thanks,
    Dave

    #2
    No reason you can't use a ListGridField with the datasource. Make sure useAllDataSourceFields is true and it will merge the two field lists together with your LGF first.

    Comment

    Working...
    X