Completed
Last Updated: 15 Aug 2019 14:26 by ADMIN
Release R3 2019 (LIB 2019.2.819)
Xxxx
Created on: 23 Jul 2019 12:44
Category: LayoutControl
Type: Bug Report
1
RadLayoutControl: setting the AssociatedControl does not work

To reproduce:

private void RadButton5_Click(object sender, EventArgs e)
{
    RadButton labelControl = new RadButton();
    labelControl.Size = new Size(200, 30);
    labelControl.Text = "Test";

    layoutControlItem1.AssociatedControl = labelControl;
}

Workaround: 
private void RadButton5_Click(object sender, EventArgs e)
{
    RadButton labelControl = new RadButton();
    labelControl.Size = new Size(200, 30);
    labelControl.Text = "Test";

    ((RadLayoutControlControlCollection)this.radLayoutControl1.Controls).RemoveInternal(layoutControlItem1.AssociatedControl);
    ((RadLayoutControlControlCollection)this.radLayoutControl1.Controls).AddInternal(labelControl);
    layoutControlItem1.AssociatedControl = labelControl;

    layoutControlItem1.UpdateControlBounds();
   
}

 

0 comments