Groups | Blog | Home
all groups > dotnet windows forms databinding > october 2006 >

dotnet windows forms databinding : BMB.CurrentChanged gets fired just once or twice?!


Bart Mermuys
10/30/2006 5:40:54 PM
Hi,

[quoted text, click to view]

CurrentChanged is fired when the current item changes, eg. the position
changes.
CurrentItemChanged is fired when CurrentChanged is fired and when one of the
current item properties changes.

BMB = this.BindingContext[DataSource, DataMember]

When using the BindingContext to get the BMB (CurrencyManager) then you need
to make sure you are using the exact same DataSource and DataMember (not
including any possible fieldname) as the ones you used to setup the
databinding.

Furthermore if you used a BindingSource, then hookup
BindingSource.CurrentItemChanged instead.


HTH,
Greetings


[quoted text, click to view]

Leon_Amirreza
10/31/2006 12:00:00 AM
I have installed a hanlder for this event:

this.BindingContext[dataSetCurriculumsCourses,
"TableInstitutes"].CurrentChanged

.....

void FormCurriculumsCoursesInstitutes_CurrentItemChanged(object sender,
EventArgs e)

{

this.Text += "1";

}

at runtime just "11" will appeare in the title bar of the form no matter how
many time the current record is changed.

I dont know what is wrong!

AddThis Social Bookmark Button