Button button = new Button(); gridControl.AddControl(button, 0, 0);
Label label = new Label(); label.Text = "Hello World!"; gridControl.AddControl(label, 1, 1);This code adds a new instance of the Label class to the grid control at position (1,1) with text "Hello World!". In both examples, the AddControl method is called on the grid control object with the child control as the first parameter and the row and column position as the second and third parameters respectively. The package library for the Grid AddControl method is the Windows Forms library, which is a part of the .NET Framework.