The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi
I am trying to change the parent property of the control that was dragged and dropped in a control container. While doing this i get the error message "The operation is not valid due to current state of the object". I dont know why this error arises. Please look at the code below for MyControl designer:
public class SingleViewControlDesigner : ControlDesigner
{
private Control myControl;
public override void Initialize(IComponent component)
{
base.Initialize (component);
myControl = (Control) component;
Control target = myControl.Parent.Parent;
myControl.Parent = target;
target.Controls.Add(myControl);
}
}
Please help me to solve this problem.
Thanks in advance,
Arun M