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

CheckedListBox control to Database

m3
anyone could pls help me with CheckedListBox control on a window form...

I have two tables: Person table (PersonID, Name, InterestID(FK)), and Interest table (InterestID, Interest).

I had displayed all vallues from the Interest column in Interest table in a CheckedListBox,
using array and Select SqlCommand. Now, my problem is, how could I record any boxes checked by the user to choose the interests of a person? Then, how could I have checkboxes checked/unchecked depending on the values of InterestID of a person in its table when showing a person's details, then be able to do any changes/updates to its interests by checking/uncheking boxes, then record those changes to the particular person table.

THANKS so much^^.
Nov 16 '05 #1
2 3308
Hi,
anyone could pls help me with CheckedListBox control on a window form...

I have two tables: Person table (PersonID, Name, InterestID(FK)), and Interest table (InterestID, Interest).

I had displayed all vallues from the Interest column in Interest
table in a CheckedListBox,
using array and Select SqlCommand. Now, my problem is, how could
I record any boxes checked by the user to choose the interests
of a person? Then, how could I have checkboxes checked/unchecked
depending on the values of InterestID of a person in its table
when showing a person's details, then be able to do any
changes/updates to its interests by checking/uncheking boxes,
then record those changes to the particular person table.

THANKS so much^^.


Are You sure that Your tables have a suitable structure?

Maybe i'm wrong, but from your description:

1. Single *Person* have single and only single *Interest*.
If that is true then

1.1. view master-detail will be more look like this:
Interest->Person(s)
e.g. for single Interest display list of peoples that
have that Interest

....and conitinue...
e.g. for single Interest display list CheckedListBox of
all Persons with checked only that Persons with selected
Interest

If I'm wrong or I misunderstan You then give me feedback!

Regards

Marcin
Nov 16 '05 #2
m3
Dear Marcin

sorry that I didn't explain my problem very well
my problem is actuallt, a single person, with one and more interest
So, when a person detail is shown, a list of interests in a ChekedListBox will be shown
as well as some boxes are checked, showing what are the interests of that particular person shown
Then we may be able to update the person's interests by checking/unchekcing, and hit a save button
Hope this explain more clearly. Thank u for your time and help^^.
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Matt C. | last post by:
Does the CheckedListBox support DisplayMember/ValueMember? I have been trying to use these properties with the CheckedListBox and they are not working. I see from Google that databinding is not...
0
by: | last post by:
David, A partial answer to your question: The 'MultiColumn' property of a CheckedListBox does not cause it to display multiple FIELDS of an item... it causes it to display the items...
4
by: Matthew | last post by:
Hi, I am using a checkedlistbox on a windows form and binding it to a collection of classes. clbAliases is the checkedlistbox control selectedplace is a class with property placealiases.This...
3
by: Steve Cutting | last post by:
Hi all, I have a CheckedListBox on one pane of a TabControl on a form. I find that whenever the user clicks a different tab then comes back, any checks that were in the list have disappeared. ...
5
by: Brian Mitchell | last post by:
I have no idea what I am doing wrong, but I have a CheckedListBox (Bound to an IList) on a TabControl and everytime I switch tabs I lose my checks. Is there something I'm missing? If I look at the...
1
by: Huahe | last post by:
Hi, I have an checkedlistbox with a lot of items, so there is a vertical scrollbar in the checkedlistbox. I want to make the checkedlistbox invisible when the mouseleave event goes off. The...
5
by: mabond | last post by:
Hi Can't believe I've not been able to find the answer to this in the on-line help. I have a CheckedListBox which, via a timer control, is populated with the names of files in a network...
6
by: Steve Teeples | last post by:
Can someone show me an example of how to place a "CheckedListBox" property within a PropertyGrid? -- ----------- Thanks, Steve
6
by: painkiller | last post by:
language: vb.net environment: windows forms .net : v1.1 i am having a checkedlistbox control that display document category such as text, image, video, audio etc. these values are coming from...
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
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
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...
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
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,...
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...
0
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.