Anki
Anki

Reputation: 67

Using ag-grid in angularJs facing issue with column headers on basis of hide and show column functionality

I am using ag-grid in angularJs and facing issue with the headings of the columns size adjustment.

The problem comes when I show and hide columns and respectively the columns get removed and added from the table. Their size horizontally adjustment is a problem.

I have used gridOptions.api.sizeColumnsToFit(); But still problem exists.

Upvotes: 0

Views: 319

Answers (1)

severus256
severus256

Reputation: 1723

{ headerName : "head1", 
  field : "headId", 
  suppressSizeToFit: false, 
  width: 200, 
  minWidth: 200 ... } // width is depends on width you need in app. 

The code above solves column's width issue for the columns appears using gridOptions.api.sizeColumnsToFit()

Upvotes: 0

Related Questions