473,587 Members | 2,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.databi ndings.add("tex t", 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 2229
Jim,

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

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

Cor

"Jim" <id****@want.sp amschreef in bericht
news:Oz******** ******@TK2MSFTN GP03.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.databi ndings.add("tex t", 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
3077
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 Binding("Text", Me.Ds1, "Items.BidAmt") txtBidAmt.DataBindings.Add(oBidAmt) Private Sub oBidAmt_Format(ByVal sender As Object, ByVal e As System.Windows.Forms.ConvertEventArgs) Handles oBidAmt.Format
1
1680
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 user should be able to move next and move previous and move
5
2292
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 datagrid and need it to hold the data for the current record selected in the datagrid. Here is a part of the code. 'DataSetWellMobile1 is the dataset with all the data 'DGWellResults is the dtagrid I am binding the data to 'txtWellComments is the...
0
1079
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. Apparently this is because ArrayList Class implements only Ilist but not IBindingList. Is this the reason and also, is there any way to get changes to the ArrayList to trigger the currency manager's events. -- Dennis in Houston
4
4606
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 bound to a table as a lookup, drawing values from another table to populate the available selections. This all worked fine in VB6. I have distilled the problem down to a simple form drawing data from the Northwind database for a representative...
2
11460
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 in datagridview2 that corresponded to a selected row in datagridview1. Great article/example.
1
5726
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 name: dataMember" I've been looking around and some people have been using the currency manager. If this is a solution could someone show me how I can add it to my code to make my binding work correctly. thanks Public Class Form1
6
4581
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 works fine: Text='<%# Eval("Price", ApplicationContext.CurrencyFormat) %>'
0
980
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 a value from a drop down control and then call the MyCurrencyManager.EndCurrentEdit(), to begin to try to save the record, the position of the currency manger becomes -1 which creates problem in saving and accessing the original record. What could...
0
7924
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8219
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8349
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8221
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.