473,385 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Add controls from one panel to the other

Expand|Select|Wrap|Line Numbers
  1. class AllUsers
  2. public void AllUsers_Load(object sender, EventArgs e)
  3.         {
  4.             new Insert().InsertMe();
  5.         }
  6.  
  7. //==================================================================
  8.  
  9. public class Insert : Linkwindow{
  10.         int checkBoxCount = 0;
  11.         public void InsertMe()
  12.         {
  13.              if (personPanel.Controls != null)
  14.             {
  15.                 Control control = new Control();
  16.                 if (control.GetType() == typeof(RadioButton))
  17.                 {
  18.                         foreach (RadioButton radios in rolePanel.Controls)
  19.                         {
  20.                             new AllUsers().allPersonPanel.Controls.Add(radios);
  21.                         }
  22.                     }
  23.                 }
  24.          }  
  25.     }
I created 2 panels in 2 different forms to add controls from the personPanel(which pulls it items from the database) to allPersonPanel but to my surprise the code does not seem to achieve this purpose, what should I do? Thanks. God bless in Jesus name.
Mar 20 '12 #1
0 1102

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: gv | last post by:
Hi all, This is probably a easy question but has me stuck. simple I have a label control on a panel control but the label control is using the text color from the panel control. I want to se...
3
by: Chris | last post by:
Hi, I'm trying to append text from another class to a generic richTextBox that I've added to a Windows form. I can't seem to figure out how to expose the richTextBox to append text to it. ...
21
by: Mark Rae | last post by:
Hi, Apologies if this is a stupid question - I'm a C# newbie... :-) I have a Windows app with two form: frmConfigReg and frmNewApp. frmConfigReg is the startup form. It has several controls,...
5
by: user | last post by:
Hello I have Form1 : System.Windows.Forms.Form and some public controls in it: public System.Windows.Forms.ComboBox comboBox1; public System.Windows.Forms.ComboBox comboBox2; in the same...
0
by: George Jordanov Ivanov | last post by:
Hi there, I have a problem related with validation of a container control, containing other container controls. Scenario: I have a dialog based Windows form, containing a group control (which...
1
by: Dan | last post by:
Is it possible to access controls on other forms when using managed C++? In VB, it was a simple matter of declaring the form as global, but this is apperently not possible when using managed code....
0
by: Darren Clark | last post by:
I need some starting advice on how to develop a server controls that shares information with other server controls of the same type? so on one page i might have 5 controls of type FOO so ...
3
by: Wouter | last post by:
Hi All, I am loading a web user control (.NET 2.0) into a placeholder on a content page ( plus the use of a master page). The controls is a list of companie, one you select a company for...
2
by: Griff | last post by:
Hi I have a web page (content.aspx) that inherits from a master page (MasterPage.master). The master page has a control (which has to be on every web page, hence on the master page)...
1
by: Thin July | last post by:
How can I call the controls of other class? they are same level within only one namespace.. but I can't ...So what should I do? by namespace declaration or by taking inheritance? or how?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.