473,386 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

bindingsource positionchanged event bug?

nev
251 100+
boundtextbox1 has a defaultvalue of "hello world"

in bs.positionchanged event, i placed...

textbox1.text = boundtextbox1.text

when i add a new record, sometimes textbox1.text correctly displays the defaultvalue "hello world". sometimes it is blank.

when i delete the record, which i know triggers the positionchanged event, textbox1.text still displays its old value instead of the value of the new record it is pointing at.

for example we have 2 records. #2 record displays "hello dude" then i'll add a new record #3. the new record will display the defaultvalue "hello world". now i'll delete #3 record, i will expect "hello dude" to be displayed since it will be the last record. but textbox1 will still display "hello world".

is this a bug?
Jan 25 '08 #1
2 2578
debasisdas
8,127 Expert 4TB
Have your written code for that ?

Have you specified if the last record is deleted it should move to the previous available record ?
Jan 25 '08 #2
nev
251 100+
Have your written code for that ?

Have you specified if the last record is deleted it should move to the previous available record ?
yep. here's n update. i focused on the boundtextbox. it follows the positionchanged event flawlessly. after i've deleted the newrecord, it points to the last record so my bountextbox displays the value for the correct record.

what i don't understand is why my unbound textbox1 doesn't copy the value in boundtextbox given that i place this code in the positionchanged event.

textbox1.text = boundtextbox1.text
Jan 25 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Leonardo | last post by:
Hi. I'm trying to build my first application with database access using VB 2005. I'm a VB 6 programmer and learning everything again has been challenging. I managed to write a code using some tips...
0
by: Geoff | last post by:
Hi folks Calling BindingSource.ResetCurrentItem() is changing the BindingSource.Position in a way I don't understand. If I'm understanding the docs correctly, ResetCurrentItem() should simply...
0
by: Rick | last post by:
VS 2005 I have some custom business objects (BindingList(of T)) connected through BindingSources to a BindingNavigator. When the user moves focus the BindingSource of the navigator can be...
0
nev
by: nev | last post by:
When bindingsource.addnew, it fires positionchanged event. When movenext, moveprevious, etc, it also fires positionchanged event. If I am to place code in positionchanged event, how will I...
0
nev
by: nev | last post by:
Have any of you encountered this? And how did you correct it? bs.addnew() automatically moves the position to the new record. But mine doesn't. I have 3 bindingsources in my program, all...
2
by: jehugaleahsa | last post by:
Hello: I have a BindingSource that has its DataSource set to a BindingList<Customerwhere Customer is a business object that manipulates a DataRow. All changes to a Customer instance, update a...
1
by: Daniel Jeffrey | last post by:
..Net 2.0 VStudio 2005 C# I know this is going to seem like a strange question, as even I am sure I have missed something - but I cant find it. I want a simple event on any of the objects...
0
nev
by: nev | last post by:
Hello all. I would like to place code when bindingsource is being filtered. I have tried placing it in the positionchanged and listchanged event. But, when I try to filter the bindingsource, it...
5
by: jehugaleahsa | last post by:
Hello: I am sure this question comes up a lot. I need to disable the controls on my Windows forms so that when the BindingSource is empty some the controls bound to it will be disabled. This...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.