Click here to Skip to main content
15,901,505 members
Home / Discussions / C#
   

C#

 
GeneralListing Items Alphabetically in TreeView Pin
cAptHiDDeN3-Jul-02 4:48
cAptHiDDeN3-Jul-02 4:48 
GeneralTransparent User Controls Pin
2-Jul-02 11:21
suss2-Jul-02 11:21 
GeneralLocalization in ASP.NET Pin
2-Jul-02 5:08
suss2-Jul-02 5:08 
GeneralTEXTBOX Pin
vikramlinux2-Jul-02 3:32
vikramlinux2-Jul-02 3:32 
GeneralRe: TEXTBOX Pin
Chris Rickard2-Jul-02 4:11
Chris Rickard2-Jul-02 4:11 
GeneralRe: TEXTBOX Pin
vikramlinux2-Jul-02 5:48
vikramlinux2-Jul-02 5:48 
GeneralRe: TEXTBOX Pin
Sorin Comanescu3-Jul-02 22:42
Sorin Comanescu3-Jul-02 22:42 
GeneralJoining two DataTables to a CheckListBox control... Pin
Andrew Connell2-Jul-02 3:28
Andrew Connell2-Jul-02 3:28 
My situation is that I have two tables: tblKeyword and tblProjectKeyword.
tblKeyword contains a list of available keywords (intKeywordID, txtKeyword).
tblProjectKeyword (intProjectID, intKeywordID).
tblProjectKeyword.intKeywordID is a FK to tblKeyword.intKeywordID.
tblProjectKeyword.intProjectID is also a FK to another table. So the
tblProjectKeyword table is a Many-Many relationship... a join table.

What I'd like to do is bind the contents of tblKeyword to a CheckListBox
control but have all the matching records in tblProjectKeyword appear
checked for a specific project. My keywords work similar to the Categories
window in Outlook items... the user will be able to check/uncheck and add
more keywords to the list.... So, the CheckedListBox would contain ALL
keywords, and have only those in the tblProjectKeyword checked. Additions
to the list would be added to the tblKeyword table and checked items would
be added to the tblProjectKeyword table.

Currently I'm implementing this manually (creating all the items... when one
is checked, I add a record to the table, etc, etc). I was wondering if I
could use databinding with this complex example. I know you can bind a
table to it, but I didn't know if I could bind two tables with some specific
conditions.

Currently, I am binding the tblKeyword table to the control.. then stepping
through everything in the list, checking to see if it's in the tblProjectKeyword list, and checking those that are found. When the checked state changes, I manually add/delete items to the tblProjectKeyword Datatable.

Thanks for your input in advance!
AC



Andrew Connell
IM on MSN
andrew@aconnell.com
GeneralAll treenodes in a treeView Pin
2-Jul-02 1:20
suss2-Jul-02 1:20 
GeneralRe: All treenodes in a treeView Pin
James T. Johnson3-Jul-02 8:58
James T. Johnson3-Jul-02 8:58 
GeneralThe C# using operator Pin
Chris Maunder1-Jul-02 15:47
cofounderChris Maunder1-Jul-02 15:47 
GeneralRe: The C# using operator Pin
Andy Smith1-Jul-02 16:03
Andy Smith1-Jul-02 16:03 
GeneralRe: The C# using operator Pin
Rama Krishna Vavilala1-Jul-02 16:05
Rama Krishna Vavilala1-Jul-02 16:05 
GeneralRe: The C# using operator Pin
Chris Maunder1-Jul-02 16:25
cofounderChris Maunder1-Jul-02 16:25 
GeneralRe: The C# using operator Pin
Rama Krishna Vavilala1-Jul-02 16:03
Rama Krishna Vavilala1-Jul-02 16:03 
GeneralRe: The C# using operator Pin
Nish Nishant1-Jul-02 16:08
sitebuilderNish Nishant1-Jul-02 16:08 
GeneralRe: The C# using operator Pin
Andy Smith1-Jul-02 16:12
Andy Smith1-Jul-02 16:12 
GeneralRe: The C# using operator Pin
Nish Nishant1-Jul-02 17:15
sitebuilderNish Nishant1-Jul-02 17:15 
GeneralRe: The C# using operator Pin
Andy Smith1-Jul-02 17:28
Andy Smith1-Jul-02 17:28 
GeneralRe: The C# using operator Pin
Rama Krishna Vavilala1-Jul-02 16:17
Rama Krishna Vavilala1-Jul-02 16:17 
GeneralRe: The C# using operator Pin
James T. Johnson1-Jul-02 17:15
James T. Johnson1-Jul-02 17:15 
GeneralRe: The C# using operator Pin
Rama Krishna Vavilala6-Jul-02 16:06
Rama Krishna Vavilala6-Jul-02 16:06 
GeneralRe: The C# using operator Pin
Andy Smith1-Jul-02 16:15
Andy Smith1-Jul-02 16:15 
GeneralRe: The C# using operator Pin
Rama Krishna Vavilala1-Jul-02 16:25
Rama Krishna Vavilala1-Jul-02 16:25 
GeneralRe: The C# using operator Pin
Andy Smith1-Jul-02 16:29
Andy Smith1-Jul-02 16:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.