Click here to Skip to main content
15,908,264 members
Home / Discussions / C#
   

C#

 
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 
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 
Conceivably you could also do this by deriving your own collection class:
<pre>
      public class AllergyCollection : List<RCH.EL.EMR.Allergies>
      {
      }
</pre>

or better yet:
<pre>
      public class AllergyCollection : BindingList<RCH.EL.EMR.Allergies>
      {
      }
</pre>
and then implementing the <code>IRaiseItemChangedEvents</code> interface, but it's one heck of a lot of work, and <code>BindingSource</code> does it all already.

<blockquote class="FQ"><div class="FQA">Mustafa Ismail Mustafa wrote:</div>but why the heck did this happen in the first place</blockquote>

The problem is that the <code>DataSource</code> property of the <code>ListBox</code> is <b>probably</b> implemented like this:
<pre>
      public object DataSource
      {
            get
            {
                  return this.datasource;
            }

            set
            {
                  if (this.datasource != value)
                  {
                        this.datasource = value;
                        // now do loads of stuff that only happens if the datasource is a different object
                  }
            }
      }
</pre>

in your case, setting the <code>DataSource</code> to the same object (albeit modified) means the test fails and nothing is changed.

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: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 
AnswerRe: SerializationBinder and parsing type fullname Pin
Super Lloyd5-Aug-09 4:00
Super Lloyd5-Aug-09 4:00 
GeneralRe: SerializationBinder and parsing type fullname Pin
Super Lloyd5-Aug-09 5:27
Super Lloyd5-Aug-09 5:27 

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.