codenamezero
codenamezero

Reputation: 3079

How to update ag-grid-community from version 20.1.0 to 24.1.0?

Namely I am facing the following few errors, but when I try to look up from the AgGrid documentation, these attributes are no where to be found... They aren't even mentioned in the Change Log for deprecation...

Firstly, I am getting these compilation errors

ERROR in : Can't bind to 'enableSorting' since it isn't a known property of 'ag-grid-angular'.

ERROR in : Can't bind to 'enableSorting' since it isn't a known property of 'ag-grid-angular'.

ERROR in : Can't bind to 'enableColResize' since it isn't a known property of 'ag-grid-angular'.

// these 3 bindings are gone? I see no mentioned of them in change log, are they even on by default now?
<ag-grid-angular [enableSorting]="true" [enableFilter]="true" [enableColResize]="true">

Secondly, these are not in the ag-grid-angular's GridOptions definition and similarly I can't find them on their documentation neither!!!

What is the usual migration approach some of you had experienced? Please enlighten me.

Upvotes: 2

Views: 1517

Answers (1)

Shuheb
Shuheb

Reputation: 2362

Sorting and Filtering is now enabled via the Column Definition. So the type definitions will be found in ColDef and not in GridOptions.

Please see the following for ColDef definitions.

If you want to enable sorting / filtering / resize on a column, simply add the properties like this:

{ field:'athlete', sortable:true, filter:true, resizable:true }

Please see the documentation on this here.

Upvotes: 1

Related Questions