Ag grid sorting functionality in parent header

Hi, I have create a ag grid datatable by using children header functionality to provide count if user applies any aggregation to it. but i m getting sortable icon no count the children header. i want the sort functionality on Order city which is an parent header. is it possible???
image

Hello @Vaishali,

Could you please provide an MRE for this, it is a little hard to follow what you are trying to do, and how you have things set up.

So i have create it like this. As you can see the sort icon is on the count as that children header have the data for it. but can we somehow shift the sort feature to the parent header?

columnDefs = [
        {
            "headerName": "Order City",
            "children": [
                {
                    "field": "order_city",
                    "headerName": f"count:{count}",
                    "cellRenderer": "markdown",
                    "width": "450px",
                },
            ],
        },

Hello @Vaishali,

I dont believe this is possible, as the parent column does not have any data.

If you want more help, please provide more info:

1 Like