This is a migrated thread and some comments may be shown as answers.

Grid column size to contents

2 Answers 34 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Neutrino
Top achievements
Rank 1
Neutrino asked on 05 Jul 2018, 03:17 PM

How do I configure a column in a Kendo Angular GridComponent to size to fit its contents please?

2 Answers, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 09 Jul 2018, 08:10 AM
Hi,

We can use the Grid's autoFitColumn() or autoFitColumns() method to fit a specific column or all columns. Check the following sample plunker, that demonstrates, how to automatically fit all columns whenever the dataStateChange event fires:
https://plnkr.co/edit/0R9dIUpDrmOWuZ0eJ0Bc?p=preview

I hope this helps.

Regards,
Svetlin
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Neutrino
Top achievements
Rank 1
answered on 13 Jul 2018, 09:56 AM
Many thanks.
Tags
General Discussions
Asked by
Neutrino
Top achievements
Rank 1
Answers by
Svet
Telerik team
Neutrino
Top achievements
Rank 1
Share this question
or