CurrencyManger Issue

  • Thread starter Christopher Weaver
  • Start date
C

Christopher Weaver

I've set up a currency manager for a ComboBox like this:

private CurrencyManager cMgrSort;
.. . . . .
cMgrSort = (CurrencyManager)this.BindingContext[dsSortOrders1, "SortOrder"];
cbSortSelectionLookup.DataSource = dsSortOrders1.Tables["SortOrder"];
cbSortSelectionLookup.ValueMember = "Sort";
cbSortSelectionLookup.DisplayMember = "Sort";
cbSortSelectionLookup.Text = "Sort";
cMgrSort.Position = cMgrSort.Count - 1;

The problem is that no change I make to cMgrSort.Position has any effect on
the ComboBox (cbSortSelectionLookup). I would like to move the current
selection through the rows of the DataTable [dsSortOrders1, "SortOrder"],
but even though I've been able to move the Position of the CurrencyManager
at run time, the value of cbSortSelectionLookp.Text never changes with it,
not before or after I click the dropdown; it only changes when I actually
make a manual selection.

Anyone have a solution to this.
 
C

Christopher Weaver

I got it!

Here's the trick to it. At least it's one way of making it work.
cbSortSelectionLookup.SelectedIndex = cMgrSort.Position;
If anyone has any further thoughts or insights about this, I would really
like to hear them.

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top