473,499 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting the checked status of dynamically created check boxes

9 New Member
I have created some check boxes dynamically but i cant get the checked status of those checkboxes in another event, how can i get it ?
Mar 15 '07 #1
4 1605
kenobewan
4,871 Recognized Expert Specialist
Please provide more information and platform that you are running. Thanks.
Mar 15 '07 #2
shweta123
692 Recognized Expert Contributor
Hi,

You can do it this way for one Checkbox

''''''''''''''''''Create object at the form level
Private objchk As New System.Windows.Forms.CheckBox()

objchk .Name = "CheckBox1"
objchk .Visible = True
objchk .Checked = False
Me.Controls.Add(objchk)

'''''''''''''''Access the checked status using in some Event as
objchk.Checked

'''''''''''''''''''''''''Or
for i=0 to form.controls.count
if Me.Controls(i).GetType().Name="CheckBox" then
'''''''''''''''Access the checked status
end if
next
Mar 15 '07 #3
vinylason
9 New Member
I have done as you said but still i cant get the status because if we call another event the page gets refreshed and the dynamic controls are created again. So the checked status cant be found.
Thanks for ur help
Mar 29 '07 #4
vinylason
9 New Member
And finally i got the answer to find the checked status of dynamically created check box.
We have to put the code of creating checkboxes in the page load event, and now we can get the checked status of those checkboxes in other event
Mar 29 '07 #5

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

Similar topics

15
2943
by: sara | last post by:
Hi I'm pretty new to Access here (using Access 2000), and appreciate the help and instruction. I gave myself 2.5 hours to research online and help and try to get this one, and I am not getting...
8
4296
by: Donald Xie | last post by:
Hi, I noticed an interesting effect when working with controls that are dynamically loaded. For instance, on a web form with a PlaceHolder control named ImageHolder, I dynamically add an image...
3
7780
by: renil | last post by:
I have a repeater control that displays info. from a datatable. Each row in the repeater has a checkbox. Also, I have a delete linkbutton outside the repeater control. What I'm trying to do when...
1
2716
by: Dan H | last post by:
I have been able to add controls dyanmically to a windows application. And I can get the Click event working beautifully. But now I want to use an another event to change the state of the check box...
1
4093
by: Kevin R | last post by:
This is one of the weirdest problems I have ever run into. I have had to trim down a bunch of code to give a sample that is more easily readable by those who will view this. Here is the problem:...
2
2303
by: Aaron Reimann | last post by:
I have a lot of check boxes. This is an update of the check boxes, I want something was checked, then to do an insert (which is currently working), if something is no longer checked...delete the...
10
18897
by: Bishman | last post by:
Hi, I need to programmatically allow or disallow the selection of multiple checkboxes on a form . At certain times I only want to allow a single selection, at other times I may wish to allow...
7
1591
by: jodleren | last post by:
Hi all! I have a problem - I have a list of checkboxes, with certain data... the point is, that some of them are set, and the important thing for mere is to get those values, which have changed...
5
3668
by: bjwest | last post by:
I'm writing a windows mobile app that uses dynamiclly created checkboxes. I'm having trouble getting the checked status. public void Add_CheckBox(String CBText) { ...
0
7007
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
7174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6894
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7388
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.