Giter Site home page Giter Site logo

Grouping: Group a column of arrays by each item. (Example, Group by Tags where cellValue=[a, b, c] and it should group by a, b, and c) about ag-grid-enterprise HOT 1 CLOSED

ajitkayastha avatar ajitkayastha commented on September 22, 2024
Grouping: Group a column of arrays by each item. (Example, Group by Tags where cellValue=[a, b, c] and it should group by a, b, and c)

from ag-grid-enterprise.

Comments (1)

kiril-matev avatar kiril-matev commented on September 22, 2024

Hello @ajitkayastha!

Thank you for opening this github issue.

You opened this issue in a legacy repository instead of the main one, which is why we've not responded to it earlier.

In the future, please illustrate your requirements with an example - this makes it much clearer.

Consider this example:
https://plnkr.co/edit/Ej2PYRuGf7GWiBMA?open=main.js

Note the country column has array values. If the grid groups in the way you've described this will result in the following resultset:
Bulgaria
John
Jamaica
Damien
United Kingdom
John
Peter
United States
Peter
Damien

However, this isn't a just grouping operation, this is a data transformation which unfolds the initial (condensed) dataset, and expands it into the following before grouping. The data transformation unfolds the dataset into this before grouping:
John Bulgaria
John United Kingdom
Peter United States
Peter United Kingdom
Damien Jamaica
Damien United States

The grid doesn't know the structure of your data. Making such a transformation involves making assumptions which the grid shouldn't be doing. The only way to implement this is for you to use the grid API, handle the rowGroupChanged and when the user is grouping by the COUNTRY column, expand (unfold) the dataset manually, then group by it, and when the user removes the COUNTRY column from the grouping to revert to the condensed (folded) dataset where instead of the 6 rows above with a single country value per row, you have 3 rows with 2 country values per row.

This is an application-level concern and you should implement this in your code as the grid cannot make assumptions about the structure of your data.

**In the future, please submit github issues in the main AG Grid repository:
https://github.com/ag-grid/ag-grid/issues

We will now close this issue and archive this repository soon to avoid any further confusion. If you want to open any new issues, please report them under the main repository to ensure they are processed promptly and seen by the entire AG Grid community.**

from ag-grid-enterprise.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.