# GroupGridColumns

### GroupGridColumns

A comma separated list of columns, that should be used for grouping. By default the grouping criteria will be the cell values for this column. The same cell values are put in one group. The column itself will be hidden from view because it will only show the group name. If a search is added to the column, the column stays visible.&#x20;

For [DateTimeBox](/brixxbox-documentation/client-api-reference/controls/datetimebox.md)the grouping value is set to the date part only and the column stays visible in order not to lose the time information.

For columns with date controls ([DateBox](/brixxbox-documentation/client-api-reference/controls/datebox.md) and [DateTimeBox](/brixxbox-documentation/client-api-reference/controls/datetimebox.md)) an individual grouping can be tailored to the specific data. This way date ranges can be shown in groups. e.g. "today", "this week", "last month". The brixxApi call 'gridColumnConfig' enables setting of this individual grouping  ranges. \
\
Example setup for date grouping (Note: [The moment.js Library](/brixxbox-documentation/client-api-reference/tips-and-tricks/date-and-time/the-moment.js-library.md) is used to set start and end dates):

```javascript

//Code should be placed as event "onAppStart"

//each entry within 'grouping' must have an array. First element is start date for
//the group and second the end date. If groups overlab (e.g. "today", "this week", "this month")
//the first matching entry is picked.

columnAddOnSettings = {
    //add some grouping criteria for this date column 
    'grouping':{
        'Future Dates': [moment().add(1, 'days'), moment('9999-12-31')],
        'Today': [moment(), moment()],
        'Last 7 days': [moment().subtract(6, 'days'), moment()],
        'This Month': [moment().startOf('month'), moment().endOf('month')],
        'This Year': [moment().startOf('year'), moment().endOf('year')],
        'Last Year and Older': [moment('1970-01-01'), moment().endOf('year').subtract(1, 'year')]
    }
};

brixxApi.gridColumnConfig ('testGrid1', 'cmpSomeDate', columnAddOnSettings);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://brixxbox.gitbook.io/brixxbox-documentation/configuration/app-editor/app-editor-properties/groupgridcolumns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
