Announcement

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

    ListGrid - Columns Displayed

    Smart GWT 2.5 Power Edition

    I could use some advice regarding the following scenario:

    I have a data source with 10 fields defined in it. I want the ListGrid to display 6 of those fields. I would like to offer the user the option of selecting the other 4 fields via the ListGrid column header menu "Columns" feature.

    Is this possible and how can it be accomplished?

    My experience thus far has been that if I define the 6 fields as ListGridFields, then the other 4 do not show up in the "Columns" menu item selection. If I submit the entire data source without any ListGridFields defined, then I get everything - which is too much for this particular presentation.

    Thanks for reviewing this.

    #2
    If this set of 6 fields is a recurring set of default fields you want to show, set the other fields detail="true" in your DataSource. If its just this one grid, provide all fields to the grid, marking 4 as hidden. Note you only need to provide the name of the field and no other settings; everything else comes from the DataSource (see QuickStart Guide Chapter 4, Data Binding).

    Comment

    Working...
    X