SharisM
SharisM

Reputation: 111

Remove sorting of one specific column in ag-Grid

I am working on an enterprise level ag-Grid which has globally set enableSorting: true for all columns. However, I have one column which must not use sorting and I want to switch it off for this specific column. When trying to configure each column, AgGridColumnDefinition type does not have sorting option, as it is mistakenly claimed in the ag-Grid reference. Info on this matter is generally scarce and obsolete.

Is there an ag-Grid guru who could help me with this?

Upvotes: 0

Views: 535

Answers (1)

MrRobboto
MrRobboto

Reputation: 752

Just checked one of my projects and it's suppressSorting on the ColDef. That's in the docs I'm pretty sure or what I just did was look at the type definitions I have since I use ag-grid with TypeScript. Here are the definitions where ColDef is for reference so next time you don't know an interface for a TypeScript project, know that they often ship with definitions or are available in DefinitelyTyped.

The version I happen to be using https://raw.githubusercontent.com/ag-grid/ag-grid/a1f1fa8c028b61ebac605016d6ccda2d121d5239/dist/lib/entities/colDef.d.ts

Upvotes: 1

Related Questions