This example shows how to auto-resize the Custom element Grid columns.
Auto Resize Columns