Announcement

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

    How to do group by field in TileGrid. like ListGrid.groupBy(field...)

    Hi,
    We are using GWT 2.8.2 and SmartGWT 6.1 power version.

    I have created a TileGrid by extending SimpleTile class for tile representation. And by passing datasource to tilegrid, All tile rendered in single block.

    Now I want to implement grouping in TileGrid by 'groupByFieldName'. So depending on values of 'groupByFieldName', tiles which have same value for field 'groupByFieldName' should come in single block with holding group title as value of field 'groupByFieldName'. And then followed other group block and so on..

    I have seen, This can be possible in ListGrid by ListGrid.groupBy(field...).

    However i need this functionality in TileGrid So could you please help me how to proceed to achieve this functionality? I am thinking about creating multiple tileGrid but I have single datasource so getting grouped record list is another problem


    Thanks
    Last edited by sidharth1917; 24 Apr 2018, 23:12.

    #2
    This feature isn't built into the TileGrid, and multiple TileGrids would not be an efficient way to accomplish this. One approach would be to implement each group of tiles as a recordComponent in a ListGrid row; this could scale to many groups of tiles via recordComponentMode:"recycle". Note in this case you are not using the ListGrid's grouping feature - you would form the groups yourself.

    You will also be generating your own tiles. Do not use SimpleTile as this is a special class designed only for use with TileGrid. To replicate the look of a SimpleTile, use a DetailViewer.

    Comment

    Working...
    X