KBD

Keith Devens .com

Thursday, November 20, 2008 Flag waving
And certainly both Horses were doing, if not all they could, all they thought they could, which is not quite... – C.S. Lewis (The Horse and His Boy, ch 10)
← Larry Wall, Perl 6, mixins, and orthogonalityNeat for loop idiom →

Daily link icon Saturday, December 6, 2003

Data Binding in .NET

Adam has a really interesting observation on data binding in .NET. Adam, thank you in advance, because you most probably just saved me lots of time at some unknown point in the future. Not only time, in fact, but I'm also saved from having to go through the conceptual discovery he spent the time going through.

I hope he doesn't mind, but I'll quote the whole thing here because the observation is short and not easily excerptable:

Using an object as the DataSoucre for two different ComboBoxes in a Windows Form means that the selection of those two boxes is synchronized. You change one, the other changes too, which is not what I expected. I just wanted to use the same IList in two drop-downs. It appears that in order to do that I need to copy the list into an array, then use .AddRange() on each box.

Why why why?

Because data-binding is conceptually about controls viewing the same record in a database, not conceptually about being MVC.

← Larry Wall, Perl 6, mixins, and orthogonalityNeat for loop idiom →

Comments XML gif


Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

November 2008
SunMonTueWedThuFriSat
 1
2345678
9101112131415
16171819202122
23242526272829
30 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 4 posts

Recent comments XML

new⇒Java join function

Meh, don't have null strings in​your string arrays imo, but you're​welcome ...

Keith: Nov 19, 7:51pm

Girls, please don't get breast implants

sorry but another thing i have to​make a comment on about you​men...the men...

happynow: Nov 17, 11:36pm

Books by Vincent Cheung

to all Cheung​fans:

read:

http://www.progin​osko.com/aquascum/cheung.h...

Zamir: Nov 16, 9:07am

Spider solitaire

To undo or not to undo that is the​question.
I'm an undoer. 
My dad​was n...

Can Turk: Nov 15, 2:50pm

Generated in about 0.223s.

(Used 8 db queries)

mobile phone