473,378 Members | 1,527 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,378 software developers and data experts.

Associate a value with a check box C#

122 100+
Ok here is the situation,

I have a panel that will dynamically load and add a list of check boxes from a database. I want to be able to identify what checkboxes were checked so that when i reload the data i can reload only the checkboxes that were checked.

I want to be able to associate the ID of the item loaded from the database that becomes the checkbox.

i.e

list of products and the client checks off the items they want to add to a cusom list.

the check box has no value and i am using the tag for something else, so where can i store the database id?

any help would be appreciated.
Feb 3 '09 #1
1 2343
vekipeki
229 Expert 100+
Maybe you could create a light wrapper class and put it in .Tag instead of "something else"?

Something like (the basic idea):
Expand|Select|Wrap|Line Numbers
  1. class CheckBoxInfo
  2. {
  3.       string ID { get; }
  4.       SomethingElse { get; }
  5. }
And then create a new instance of CheckBoxInfo (or whatever you decide to name it) for each CheckBox. Would that break your existing code?
Feb 3 '09 #2

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

Similar topics

0
by: Mamun | last post by:
Hi All, I have the following case. I am trying to update a table based on the value of dropdown box and checkbox. Here is what I have in page1.asp <table>
1
by: knutsample | last post by:
Hello! I'm trying to associate a file extension to my wxPython script so that all I have to do is double click on the file and my python script will load up with the path of that file. For...
6
by: Ashok | last post by:
hi, i want to know how to make a specific type of file open in an application i developed in python when the user clicks on the file.(in windows) for eg. a .txt file when clicked opens in notepad,...
2
by: John Baker | last post by:
Hi: I have used this group a number of times simply because while the manuals for Access may show the technology, but most are really weak on how to apply it in special situations and the...
8
by: Chandrashekar Tippur | last post by:
All, We want to associate a argument with a corresponding entry in header file. How do we do this? The argument is defined in a header file. We want to extract the value of the #define...
5
by: steve bull | last post by:
I am sure this is a really basic question but I don't see an easy way to do it. I have an enum public enum ColorType { red = 0, green = 1, blue = 2, hue = 3,
5
by: Ger | last post by:
The propertygrid is a great control, but I would like to show a more descriptive text for the properties in the control. I tried to find a solution within the system.componentmodel but did not...
1
by: Niclas | last post by:
Hi, in ASP .Net, I can associate a value with and item in a dropdown list, for example when binding to a list of employees, I can store the employeeid as a value associated with each name in in...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.