Re: CurrencyManager Question



Hartley,

Seems difficult to me, because when you use whatever AddNew method than
there will be a new row created. The CurrencyManager AddNew set direct the
pointer to this new added row and therefore your textbox is nothing at that
moment.

In my opinion is what you try to do not in the line of binded bounds or in
other words.
It does me reminds on that Jewish Witz (joke), that I have more times writen
in this newsgroup.


Cor

<hartley_aaron@xxxxxxxxxxx> schreef in bericht
news:1148661067.836156.189840@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

CurrencyManger has a method called AddNew which well create a new
record in the data that it is bound to (ie a new datarow in a table).
The new record has null values for all of its elements. What I would
like to have is the ability to add a new record using the current
values of the TextBox fields that have been bound to the datasource.

I have tried various solutions to have the code edit the record using
the current values after it has been created, but the null values cause
a 'System.Data.NoNullAllowedException' error. Here is one attempt:

objCurrencyManager.AddNew()
objCurrencyManager.EndCurrentEdit()

Any ideas?

Thanks,
Aaron



.