By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,218 Members | 1,111 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,218 IT Pros & Developers. It's quick & easy.

Currency Manager Issue.

P: n/a
Hi there,

I have a form with a couple of tabs on in and I'm filling the form from a
dataset with the fill method. I am using a currency manager for binding
controls with a datatable.
mCurrencyManager = Me.BindingContext(dtTestTable)

dtTestTable holds the table that loading on the form.

I'm filling a listbox with names and the corresponding data gets displayed
on the right side of the form. kind of a treeview interface.

Now my problem is when I want to add a new record to the database, when I
invoke the mCurrencyManager.EndCurrentEdit() and then the
mCurrencyManager.AddNew method, the form or at least the current record does
not get blanked. on the listbox it goes to the end of it with a blank line
but it just does not end the current edit.

I have been trying so many things to find out why for the life of me, the
currency manager does respond to the .addnew method or EndCurrentEdit.

Can anybody out there tell or give some hints on how to make this work?

Thanks very much in advance,

Manny.
Nov 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
> Now my problem is when I want to add a new record to the database, when I
invoke the mCurrencyManager.EndCurrentEdit() and then the
mCurrencyManager.AddNew method, the form or at least the current record does not get blanked. on the listbox it goes to the end of it with a blank line
but it just does not end the current edit.

Hi Manuel I assume you are talking about the dataset(datatable) instead of
the real database.

What the behaviour should be is that there is added a new blank line at the
end of the dataset which is showed at the end of the listbox. And I think
that that is happening, therefore what is it that you want to archieve?

Cor

Cor
Nov 20 '05 #2

P: n/a
Hey Cor,

Sorry I meant the dataset(datatable). when I execute the
mCurrencyManager.AddNew method, the blank line gets added at the end of the
listbox, but all the binded records don't get cleared, it stays at the
current one. I don't have any check boxes and I know there's a bug on the
framework but there's a solution for that one anyways.

I have two fields that are of money type on the database plus the id on the
table.

txtTextID.DataBindings.Add("Text", dvTest1, "TestID") integer on the
database
txtTextID.DataBindings.Add("Text", dvTest2, "Test2ID") money on the database

Could this be the problem? the .AddNew not recognizing or not being able to
convert this ones into the proper database type ?

Thanks very much,

Manuel

"Manuel Canas" <mc*****@hotmail.com> wrote in message
news:c5FHc.16026$eO.10596@edtnps89...
Hi there,

I have a form with a couple of tabs on in and I'm filling the form from a
dataset with the fill method. I am using a currency manager for binding
controls with a datatable.
mCurrencyManager = Me.BindingContext(dtTestTable)

dtTestTable holds the table that loading on the form.

I'm filling a listbox with names and the corresponding data gets displayed
on the right side of the form. kind of a treeview interface.

Now my problem is when I want to add a new record to the database, when I
invoke the mCurrencyManager.EndCurrentEdit() and then the
mCurrencyManager.AddNew method, the form or at least the current record does not get blanked. on the listbox it goes to the end of it with a blank line
but it just does not end the current edit.

I have been trying so many things to find out why for the life of me, the
currency manager does respond to the .addnew method or EndCurrentEdit.

Can anybody out there tell or give some hints on how to make this work?

Thanks very much in advance,

Manny.

Nov 20 '05 #3

P: n/a
> txtTextID.DataBindings.Add("Text", dvTest1, "TestID") integer on the
database
txtTextID.DataBindings.Add("Text", dvTest2, "Test2ID") money on the

database

I saw it in the other newsgroup, probably you did not do
cma = Directcast(BindingContext(dvTest2), CurrencyManager)

And please no multipost again

I hope this helps?

Cor


Nov 20 '05 #4

P: n/a
Sorry Cor. No more multipostings.
I saw it in the other newsgroup, probably you did not do
cma = Directcast(BindingContext(dvTest2), CurrencyManager)
what would be the cma? what command?

Thanks,

Manuel
"Manuel Canas" <mc*****@hotmail.com> wrote in message
news:c5FHc.16026$eO.10596@edtnps89... Hi there,

I have a form with a couple of tabs on in and I'm filling the form from a
dataset with the fill method. I am using a currency manager for binding
controls with a datatable.
mCurrencyManager = Me.BindingContext(dtTestTable)

dtTestTable holds the table that loading on the form.

I'm filling a listbox with names and the corresponding data gets displayed
on the right side of the form. kind of a treeview interface.

Now my problem is when I want to add a new record to the database, when I
invoke the mCurrencyManager.EndCurrentEdit() and then the
mCurrencyManager.AddNew method, the form or at least the current record does not get blanked. on the listbox it goes to the end of it with a blank line
but it just does not end the current edit.

I have been trying so many things to find out why for the life of me, the
currency manager does respond to the .addnew method or EndCurrentEdit.

Can anybody out there tell or give some hints on how to make this work?

Thanks very much in advance,

Manny.

Nov 20 '05 #5

P: n/a
You use a currencymanger somewhere however I think that you use it in
combination with the dataset(table) while you use for the databinding the
dataview.

Than you get the behaviour as you describe.

So I gues that it is that, othwerwise show some more code?

I hope this helps?

Cor

Nov 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.