Click here to Skip to main content
16,017,238 members
Home / Discussions / C#
   

C#

 
GeneralRe: Interfaces & Protected Methods Pin
Guffa31-Aug-05 21:04
Guffa31-Aug-05 21:04 
GeneralRe: Interfaces & Protected Methods Pin
phimix1-Sep-05 0:27
phimix1-Sep-05 0:27 
GeneralRe: Interfaces & Protected Methods Pin
Guffa1-Sep-05 5:50
Guffa1-Sep-05 5:50 
QuestionImage zooming and displaying Pin
E6AD30-Aug-05 1:14
E6AD30-Aug-05 1:14 
AnswerRe: Image zooming and displaying Pin
Andrew Kirillov30-Aug-05 2:00
Andrew Kirillov30-Aug-05 2:00 
QuestionArray of PictureBoxes Pin
Yoyosch29-Aug-05 23:45
Yoyosch29-Aug-05 23:45 
AnswerRe: Array of PictureBoxes Pin
SeMartens30-Aug-05 3:55
SeMartens30-Aug-05 3:55 
Questionchukkykzn@msn.com Pin
chukkykzn29-Aug-05 23:27
chukkykzn29-Aug-05 23:27 
Hey,

Firstly I'm using VS 2005 Beta2.

I'm using databinding to a combobox which is populated with user defined objects (of the same type), and the databinding is on the it's SelectedItem property.

<br />
Binding bOnX = new Binding("SelectedItem", myDataSource, "objX");<br />
<br />
bOnX.DataSourceUpdateMode = DataSourceUpdateMode.OnPropertyChanged;<br />
<br />
comboBox.DataBindings.Add(bOnX);<br />



Now I know by default the databinding is onValidation hence I've changed it to OnPropertyChanged. However, it still does not bind to the data source when I changed the selected item, only when I move focus to another control. With that said, I'm also using the same DataSourceUpdateMode for a text box with a databinding on it's Text property and that works every time the text changes in the TextBox.

I think (please correct me if I'm wrong) that the OnPropertyChanged on works on the the property being bound to, for eg.:
for,

Binding bOnX = new Binding("Text", myDataSource, "strX");

DataSourceUpdateMode.OnPropertyChanged, works on the TextChanged event
but because there is no SelectedItemChanged event it does not work on the former example.

Can anyone please let me know if I'm right or wrong, and either way, please suggest a solution.



chukkykzn
chukkykzn@msn.com
QuestionHow to change the default size of the PropertyGrid description pane? Pin
Gatchan29-Aug-05 23:03
Gatchan29-Aug-05 23:03 
Question&quot;Time bomb&quot; (trial version-like) Pin
gnjunge29-Aug-05 22:57
gnjunge29-Aug-05 22:57 
AnswerRe: &quot;Time bomb&quot; (trial version-like) Pin
Barm29-Aug-05 23:55
Barm29-Aug-05 23:55 
QuestionSHUTDOWN Pin
tatchung29-Aug-05 21:59
tatchung29-Aug-05 21:59 
AnswerRe: SHUTDOWN Pin
Barm29-Aug-05 23:44
Barm29-Aug-05 23:44 
GeneralRe: SHUTDOWN Pin
tatchung30-Aug-05 15:11
tatchung30-Aug-05 15:11 
GeneralRe: SHUTDOWN Pin
Barm30-Aug-05 18:11
Barm30-Aug-05 18:11 
GeneralRe: SHUTDOWN Pin
tatchung30-Aug-05 18:15
tatchung30-Aug-05 18:15 
Questionhow to save the files in c sharp.net Pin
sajikp29-Aug-05 21:13
sajikp29-Aug-05 21:13 
AnswerRe: how to save the files in c sharp.net Pin
Stefan Troschuetz29-Aug-05 21:39
Stefan Troschuetz29-Aug-05 21:39 
GeneralRe: how to save the files in c sharp.net Pin
sajikp30-Aug-05 20:18
sajikp30-Aug-05 20:18 
GeneralRe: how to save the files in c sharp.net Pin
Stefan Troschuetz30-Aug-05 21:01
Stefan Troschuetz30-Aug-05 21:01 
QuestionCapture and streaming Pin
aspiringCodeMonkey29-Aug-05 21:09
aspiringCodeMonkey29-Aug-05 21:09 
AnswerRe: Capture and streaming Pin
Dario Solera29-Aug-05 21:22
Dario Solera29-Aug-05 21:22 
QuestionSuperscript Pin
Patrik Ruzic29-Aug-05 19:49
Patrik Ruzic29-Aug-05 19:49 
AnswerRe: Superscript Pin
Christian Graus29-Aug-05 20:03
protectorChristian Graus29-Aug-05 20:03 
Questionhelp me to correct my code Pin
sajikp29-Aug-05 19:39
sajikp29-Aug-05 19:39 

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.