New to Telerik UI for WinForms? Download free 30-day trial

Accessing Child Templates

You can programmatically access your child templates using MasterTemplate.Templates collection. For example, use the following code to set the AutoSizeColumnsMode to Fill in the first child template :

this.radGridView1.MasterTemplate.Templates[0].AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;

Me.RadGridView1.MasterTemplate.Templates(0).AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill

See Also

In this article