PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms Data Binding Question.

Reply

Data Binding Question.

 
Thread Tools Rate Thread
Old 01-06-2005, 03:25 PM   #1
=?Utf-8?B?S29uc3RhbnRpbg==?=
Guest
 
Posts: n/a
Default Data Binding Question.


I have a problem that I jave been struggling with for several days...

I have a form with a three text boxes that are bound to a dataview like:

this.Quantity.DataBindings.Add("Text",DataSet1.Table1.DefaultView,"Quantity");
this.UnitPrice.DataBindings.Add("Text",DataSet1.Table1.DefaultView,"UnitPrice");
this.Subtotal.DataBindings.Add("Text",DataSet1.Table1.DefaultView,"Subtotal");

I'm working with a legacy database, so I need to actually write the subtotal
to the database, instead of using a calculated field or column.

I have been trying to get the Subtotal textbox to calculate the correct
amount as soon as the user changes the Quantity or the UnitPrice values.

The closest I ever got was using a CurrencyManager object, but the Subtotal
only refreshed when I moved forward and then back in the dataset. I just
can't get it to update otherwise.

Can someone help me with this. I have combed through the newsgroups and I
found several "close" examples, but none have worked so far.

Any help will be greatly appreciated.

Thanks.
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off