Click here to Skip to main content
15,919,613 members
Home / Discussions / C#
   

C#

 
AnswerRe: twitter Pin
Harvey Saayman25-Feb-10 20:16
Harvey Saayman25-Feb-10 20:16 
Questionhow to read a html file into console Pin
ramyakrishna k25-Feb-10 19:57
ramyakrishna k25-Feb-10 19:57 
AnswerRe: how to read a html file into console Pin
Saksida Bojan25-Feb-10 20:19
Saksida Bojan25-Feb-10 20:19 
JokeRe: how to read a html file into console Pin
Harvey Saayman25-Feb-10 20:21
Harvey Saayman25-Feb-10 20:21 
AnswerRe: how to read a html file into console Pin
Luc Pattyn25-Feb-10 22:25
sitebuilderLuc Pattyn25-Feb-10 22:25 
QuestionUse Mdi from User Control? [modified] Pin
Pawan Kiran25-Feb-10 19:53
Pawan Kiran25-Feb-10 19:53 
AnswerRe: Use Mdi from User Control? Pin
Saksida Bojan25-Feb-10 20:16
Saksida Bojan25-Feb-10 20:16 
QuestionThree ComboBoxes, a DataTable, and a BindingSource ? Pin
Matthew Klein25-Feb-10 14:25
Matthew Klein25-Feb-10 14:25 
I have a DataTable that has three columns, named “Department”, “Manager”, “Employee”
The data looks like:

Accounting – John M – Mark E
Accounting – John M – Jane E
Accounting – Tim M – Bob E
Sales – Tom M – Matt E
Sales – Phil M – Jill E

And I have three combo boxes that represent each column in the DataTable:
departmentComboBox
managerComboBox
employeeComboBox

and finally I have a BindingSource that is being bound to each combo box, with each combo box’s .DisplayMember set to the proper column name

My issue: Each combo box displays 5 items... meaning the departmentComboBox shows “Accounting” three times and “Sales” twice, and similar for the other two ComboBoxes.

How can I have each ComboBox display only the unique and appropriate items based on the BindingSource’s current position? So if the first row is my current position in the DataTable, the combo boxes should have:
departmentComboBox = {“Accounting”, “Sales” } (with “Accounting” selected)
managerComboBox = {“John M”, “Tim M”} (with “John M”) selected)
employeeComboBox = {“Mark E”, “Jane E”} (with “Mark E” selected)

The only way I’ve seen that I might be able to do this is by having three DataTables and create a relationship between each of them, but I was hoping there was a more direct way...

Thank you all for your time,
Matt
AnswerRe: Three ComboBoxes, a DataTable, and a BindingSource ? Pin
Arindam Tewary25-Feb-10 19:22
professionalArindam Tewary25-Feb-10 19:22 
QuestionEnter/Leave debug methods? Pin
Jim Turner25-Feb-10 11:46
Jim Turner25-Feb-10 11:46 
AnswerRe: Enter/Leave debug methods? Pin
Abhinav S25-Feb-10 12:17
Abhinav S25-Feb-10 12:17 
AnswerRe: Enter/Leave debug methods? Pin
Eddy Vluggen25-Feb-10 13:08
professionalEddy Vluggen25-Feb-10 13:08 
AnswerRe: Enter/Leave debug methods? Pin
David Skelly25-Feb-10 22:19
David Skelly25-Feb-10 22:19 
QuestionListview Control problem - thumbnail display Pin
Eagle3225-Feb-10 8:03
Eagle3225-Feb-10 8:03 
AnswerRe: Listview Control problem - thumbnail display Pin
Saksida Bojan25-Feb-10 11:15
Saksida Bojan25-Feb-10 11:15 
GeneralRe: Listview Control problem - thumbnail display Pin
Eagle3226-Feb-10 4:09
Eagle3226-Feb-10 4:09 
QuestionERROR in starting service Pin
noamtzu0025-Feb-10 6:51
noamtzu0025-Feb-10 6:51 
AnswerRe: ERROR in starting service Pin
Saksida Bojan25-Feb-10 7:42
Saksida Bojan25-Feb-10 7:42 
GeneralRe: ERROR in starting service Pin
noamtzu0025-Feb-10 8:12
noamtzu0025-Feb-10 8:12 
GeneralRe: ERROR in starting service Pin
Saksida Bojan25-Feb-10 11:06
Saksida Bojan25-Feb-10 11:06 
AnswerRe: ERROR in starting service Pin
The Man from U.N.C.L.E.25-Feb-10 8:06
The Man from U.N.C.L.E.25-Feb-10 8:06 
GeneralRe: ERROR in starting service Pin
noamtzu0025-Feb-10 8:14
noamtzu0025-Feb-10 8:14 
GeneralRe: ERROR in starting service Pin
Wes Aday25-Feb-10 9:03
professionalWes Aday25-Feb-10 9:03 
GeneralRe: ERROR in starting service Pin
The Man from U.N.C.L.E.25-Feb-10 22:17
The Man from U.N.C.L.E.25-Feb-10 22:17 
Questionbehavior of Windows.Forms.Timer vs WM_TIMER Pin
manustone25-Feb-10 5:50
manustone25-Feb-10 5:50 

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.