Click here to Skip to main content
15,892,809 members
Home / Discussions / C#
   

C#

 
AnswerRe: Create Textfile Pin
musefan5-Aug-09 2:32
musefan5-Aug-09 2:32 
GeneralRe: Create Textfile Pin
5fingers5-Aug-09 3:11
5fingers5-Aug-09 3:11 
GeneralRe: Create Textfile Pin
stancrm5-Aug-09 3:18
stancrm5-Aug-09 3:18 
GeneralRe: Create Textfile Pin
5fingers5-Aug-09 3:46
5fingers5-Aug-09 3:46 
GeneralRe: Create Textfile Pin
stancrm5-Aug-09 19:12
stancrm5-Aug-09 19:12 
GeneralRe: Create Textfile Pin
musefan5-Aug-09 3:21
musefan5-Aug-09 3:21 
QuestionListBox won't bind Pin
Mustafa Ismail Mustafa5-Aug-09 2:05
Mustafa Ismail Mustafa5-Aug-09 2:05 
AnswerRe: ListBox won't bind Pin
Henry Minute5-Aug-09 5:04
Henry Minute5-Aug-09 5:04 
Try this:

Add two BindingSource Components to your Form (remainderBindingSource and patientBindingSource, for my mods below)

//Method that binds
protected void BindListBoxes()
{
    this.remainderBindingSource.DataSource = RemainingAllergies;
    lstAllergies.DataSource = this.remainderBindingSource;
    //lstAllergies.DataSource = RemainingAllergies;
    lstAllergies.DisplayMember = "AllergyAr";
    lstAllergies.ValueMember = "ID";

    this.patientBindingSource.DataSource = PatientAllergies;
    lstPatientAllergies.DataSource = this.patientBindingSource;
    //lstPatientAllergies.DataSource = PatientAllergies;
    lstPatientAllergies.DisplayMember = "AllergyAr";
    lstPatientAllergies.ValueMember = "ID";
}

//event handler methods that move the items from one list to the other (arrow buttons on the form)
private void btnAddLeft_Click(object sender, EventArgs e)
{
    patientBindingSource.Add((RCH.EL.EMR.Allergies)lstAllergies.SelectedItem);
    //PatientAllergies.Add((RCH.EL.EMR.Allergies)lstAllergies.SelectedItem);
    remainderBindingSource.Remove((RCH.EL.EMR.Allergies)lstAllergies.SelectedItem);
    //ResolveAllergies();
    //lstAllergies.Refresh();
    //lstPatientAllergies.Refresh();
    //BindListBoxes();
}


I'm sure that a man of your calibre can work the rest out.

Hope this helps! Smile | :)

Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”

GeneralRe: ListBox won't bind Pin
Mustafa Ismail Mustafa5-Aug-09 5:19
Mustafa Ismail Mustafa5-Aug-09 5:19 
GeneralRe: ListBox won't bind Pin
Henry Minute5-Aug-09 5:35
Henry Minute5-Aug-09 5:35 
GeneralRe: ListBox won't bind Pin
Mustafa Ismail Mustafa5-Aug-09 5:38
Mustafa Ismail Mustafa5-Aug-09 5:38 
GeneralRe: ListBox won't bind Pin
Henry Minute5-Aug-09 5:41
Henry Minute5-Aug-09 5:41 
GeneralRe: ListBox won't bind Pin
Mustafa Ismail Mustafa5-Aug-09 5:47
Mustafa Ismail Mustafa5-Aug-09 5:47 
GeneralRe: ListBox won't bind Pin
Mustafa Ismail Mustafa5-Aug-09 5:35
Mustafa Ismail Mustafa5-Aug-09 5:35 
GeneralRe: ListBox won't bind Pin
Henry Minute5-Aug-09 5:38
Henry Minute5-Aug-09 5:38 
QuestionHelp in matching inputted string to a regex pattern Pin
gamer11275-Aug-09 2:05
gamer11275-Aug-09 2:05 
AnswerRe: Help in matching inputted string to a regex pattern Pin
musefan5-Aug-09 2:22
musefan5-Aug-09 2:22 
AnswerRe: Help in matching inputted string to a regex pattern Pin
gamer11275-Aug-09 2:31
gamer11275-Aug-09 2:31 
GeneralRe: Help in matching inputted string to a regex pattern Pin
OriginalGriff5-Aug-09 2:54
mveOriginalGriff5-Aug-09 2:54 
GeneralRe: Help in matching inputted string to a regex pattern Pin
molesworth5-Aug-09 3:07
molesworth5-Aug-09 3:07 
GeneralRe: Help in matching inputted string to a regex pattern Pin
gamer11275-Aug-09 4:00
gamer11275-Aug-09 4:00 
GeneralRe: Help in matching inputted string to a regex pattern Pin
riced5-Aug-09 4:22
riced5-Aug-09 4:22 
GeneralRe: Help in matching inputted string to a regex pattern Pin
gamer11275-Aug-09 4:39
gamer11275-Aug-09 4:39 
GeneralRe: Help in matching inputted string to a regex pattern Pin
riced5-Aug-09 4:44
riced5-Aug-09 4:44 
QuestionSerializationBinder and parsing type fullname Pin
Super Lloyd5-Aug-09 1:46
Super Lloyd5-Aug-09 1:46 

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.