• Marc
  • Member Topic Starter
Hi Igor

I wonder if there is a built-in method to (temporarly) store "group by" settings of an iGrid (similar to store sort options).

I allow users to group iGrid rows using the process decribed below:

1) the user has to select a cell (i.e. a column)
2) if the user then presses a "group by" button, the respective column is added to the group object (I add it because the user should be able (but not forced) to perform a multi-level group by, e.g.

- January
--Company A
--Company B
- February
--Company A
--Company B


Company A
- Sales
-- January
- Costs
Company B

3) the user has also the possibility to sort and filter the iGrid (the latter leads to hidden rows)

Due to the various filter, sort and group options I want to offer my users and due to the different approaches I use to update the visible rows according to user's choice (sometimes I reload data from my DB, sometimes I change visibility of grid rows), it would be nice to store actual "group by" settings, perform a data reload and then re-apply the group settings (a kind like it works for sorting and column layout).

Is there a way to store group settings? Maybe to keep a disconnected group object that can be re-applied after an ungroup command? (as far as I know a group object is going to be destroyed automatically using the ungroup method and it can't be created as a stand-alone object)

Thanks in advance for a little hint!

Yes, I understand - you mean something as LayoutGroup, which could be similar to LayourSort.

I've noted this as a suggestion for the future updates. In the current version, you need to implement this save/restore grouping functionality by yourself. When you do this, take into account the following info (an excerpt from iGrid's CHM help):


Automatic grouping and the current sort criteria

The iGrid automatic grouping works together with the current sort criteria. If you have sorted iGrid before grouping (i.e. iGrid's SortObject has some items), iGrid keeps this sort criteria while grouping. In fact, iGrid combines the specified group criteria and the current sort criteria so the grouped columns become the first columns iGrid is sorted by. Here are some examples:

  • The grid isn't sorted. If you group it by the 1st and 2nd columns (let's call them Col1 and Col2), both GroupObject and SortObject will contain Col1 and Col2.
  • The grid has been sorted by Col1, Col3 and Col5, and you group it by Col2. The result will be the following: GroupObject contains Col2, SortObject contains Col2, Col1, Col3, Col5 (in this order).
  • The grid has been sorted by Col1, Col3 and Col5, and you group it by Col2 and Col5. After the grouping GroupObject will contain Col2, Col5, SortObject will contain Col2, Col5, Col1, Col3.