Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
May 13, 2011
i hv dynamically created a group box and each hv 10 buttons in it which are also dynamically created.
my problem is that i want to know that the user has clicked the button belongs to which group box............
can anyone pls help me
Posted Date: May 15, 2011 Points: 40
You can check for clicked button's .Parent property. It should give you the GroupBox.
Hope this helps
Hope this helps.
Thanks & Regards,
Posted Date: May 16, 2011 Points: 20
Posted Date: July 12, 2011 Points: 20
In Declaration Side
private System.Windows.Forms.GroupBox GB;
GB = new GroupBox();
GB.Name = "GroupName1";
GB.Height = 1000;
GB.Width = 1000;
GB.Left = 10;
GB.Top = 10;
Button Btn = new Button();
Btn.Name = "Button1";
Btn.Text = "Test";
Btn.Height = 20;
Btn.Width = 45;
Btn.Left = 45;
Btn.Top = 150;
Btn.Click += new System.EventHandler(this.clickEvent);
private void clickEvent(object sender, EventArgs e)
str = GB.Name;
MessageBox.Show("Group Name" + " " + str);
Regards, Lakshmi Naraayanan.S
To post reply
Related Questions Related Questions
How to merge or group the columns in gridview....??
Oracle Group by clause
Gridview having group heading, group total and edit option
Add Multiple users to sharepoint Members group using powershell
Add new user to SharePoint Group
Item Description Selection based on Group Name. Category, Item Name,
display parent data and child data as a row group in one datagridview using c# winform
Latest Forum Questions From The Same Category
Mail is working but I want send two excel file to each different person
how to display child nodes with headers and keeping the child nodes in a table
In DataGrid I have Two Dropdownlist, One in Header template and Item Template
Display data directly from database table to PDF using stored procedures in asp.net C#
How to install and use Dev Express ?
Dialogbox Custom Control
Custom Control in Winforms
I just started learning c#.net console application
How to read csv file which have many special character and tabs?
USSD using AT COMMAND
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend