Our blazing fast Grid component built with pure JavaScript


Post by kristoffer88 »

We’re experimenting with the samples to see if they fit our use cases.

We’re trying to use the .group function on a BryntumGrid instance:

const gridRef = useRef<BryntumGrid>(null);

// GridBase.group signature:
(method) GridBase.group(
  levels: (string | Column | ((model: Model) => any))[]
): Promise<void>
// “Transforms the data according to the supplied levels.”

// This line:
gridRef.current?.instance.group(["key"]);
// results in:
TypeError: gridRef.current.instance.group is not a function

Is there an issue with the instance types, or are we calling it incorrectly?


Post by tasnim »

Hi kristoffer88,

Welcome to Bryntum Forum!

To have that method working you'd need to enable TreeGroup feature and Tree (Tree feature is needed for TreeGroup to work as mentioned here) feature as mentioned in the docs here https://bryntum.com/products/grid/docs/api/Grid/view/Grid#function-group

Added by the TreeGroup feature, only available when that feature is enabled.

First, you'd need to enable these two features

            <BryntumGrid
                treeGroupFeature={true}
                treeFeature={true}
                ...
            />

And then you should not see that error in your console anymore.

If you have any other questions or concerns, please don't hesitate to reach out to us. We're here for your help! :)

Best regards,
Tasnim

How to ask for help? Please read our Support Policy


Post Reply