473,395 Members | 2,467 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,395 software developers and data experts.

Binding Manager/Currency Manager Problem?

Jim
Hi,

Trying to implement databinding. I've a dataset with a table, a windows
form with typical controls: combobox, datetimepicker, textbox . . .
I use what I think is a normal method to establish the bindings:
textbox1.databindings.add("text", dataset, table.column)

The records displays in the UI(if it exists). I can create an initial record
and successfully save to the database.

The problem occurs when I attempt to add a new record to the existing
dataset. The BindingManager object accepts a move to the new position (which
equals the record count in my dataset/or the record position in the
dataset). But, having moved the binding manager's position doesn't result in
a blanking of the UI controls, such as I would expect with a newly added
record, and any changes I make in the UI controls, aren't reflected in the
newly added record when I go to save it.

I don't think I've added a new binding manager when creating a new record in
the dataset.
Does anyone have any pointers on what I'm doing wrong? My understanding of
this is that the bindingmanager should be changing the values of the UI
controls to reflect the underlying data record.

Is the a working, non-ntier, windows forms example that implements basic
CRUD operations, including the use of databinding? I've already reviewed the
help files repeatedly. What am I missing?

Thanks,
Jim

Jan 4 '08 #1
1 2217
Jim,

This mostly depends on how you do the Add, using the AddNew in the
currrencymanager will probably the solution.

http://msdn2.microsoft.com/en-us/lib...ew(VS.71).aspx

Cor

"Jim" <id****@want.spamschreef in bericht
news:Oz**************@TK2MSFTNGP03.phx.gbl...
Hi,

Trying to implement databinding. I've a dataset with a table, a windows
form with typical controls: combobox, datetimepicker, textbox . . .
I use what I think is a normal method to establish the bindings:
textbox1.databindings.add("text", dataset, table.column)

The records displays in the UI(if it exists). I can create an initial
record
and successfully save to the database.

The problem occurs when I attempt to add a new record to the existing
dataset. The BindingManager object accepts a move to the new position
(which
equals the record count in my dataset/or the record position in the
dataset). But, having moved the binding manager's position doesn't result
in
a blanking of the UI controls, such as I would expect with a newly added
record, and any changes I make in the UI controls, aren't reflected in the
newly added record when I go to save it.

I don't think I've added a new binding manager when creating a new record
in
the dataset.
Does anyone have any pointers on what I'm doing wrong? My understanding
of
this is that the bindingmanager should be changing the values of the UI
controls to reflect the underlying data record.

Is the a working, non-ntier, windows forms example that implements basic
CRUD operations, including the use of databinding? I've already reviewed
the
help files repeatedly. What am I missing?

Thanks,
Jim
Jan 5 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Slonocode | last post by:
I have some textboxes bound to an access db. I wanted to format the textboxes that displayed currency and date info so I did the following: Dim WithEvents oBidAmt As Binding oBidAmt = New...
1
by: madhu | last post by:
Hello all, I am a bignner to vb.net I am not able to move the dataset and bind the textbox to dataset. My objective is 1) when the form loads it should display the first record. and the...
5
by: Brad Shook | last post by:
I am trying to bind one column of a datagrid to a seperate textbox and the rest of the fields to a datagrid. the comments are too large to fit in a datagrid so I created a textbox below the...
0
by: Dennis | last post by:
I seem to be able to instantiate a currency manager from a bindingcontext using an arraylist but changes I make to the arraylist don't seem to trigger any of the Currency manager's events. ...
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
2
by: Rich | last post by:
Hello, Following an example at http://www.vb-tips.com/dbpages.aspx?IA=DG (by Cor Lightert and Ken Tucker) on binding a dataRelation to a Datagridview for sqlClient, I was able to view rows...
1
by: mike11d11 | last post by:
Can anyone Tell me why this code doesnt let me bind a Textbox field to the Account# column in my SQL table. It says "Cannot bind to the property or column ACCOUNT# on the DataSource. Parameter...
6
by: Tomasz J | last post by:
Hello developers, I bind my TextBox control specyfying a format stored in my application global ApplicationContext object - it has a static string CurrencyFormat property. The problem - this...
0
by: John | last post by:
Hi I have a winform app with fields bound to a backbend db via a currency manager (System.Windows.Forms.CurrencyManager). The app generally works fine but in a specific instance where I select...
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: 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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.