Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
A WinCombo databinding issue...
posted

Hello All,
     I am in the process of setting up a form, with a grid on top and a "Details" area below.  For this example I'll give some specifics...  The grid contains "Tier Rates"   A Tier Rate has three columns that I'd like to use a Combo box  below in the "Details" area.  They are AR Code, Cash Code, and Revenue Code.  In the database this fields contail  string such as: " 5001.4000.50.1".  What I would like to happen, is that when a "User" selects a row in the grid, that the "Details" area would be updated with the values for that Particular "Tier Rate".    Now, I've created a ValueList from a collection of Account Codes that contain only the account Codes for a particular type of account (AR,Cash, and revenue)...  In my binding sub, I've assigned these lists to the Comboboxes .ValueList property...  (That seems to work, as the combo boxes display the proper values...)  Next I tried to add to the comboboxes DataBindings property a new binging using the following line:

     cboRevenueCode.DataBindings.Add(New Binding("Value", Source, "DefaultRevenueCode"))

Where "Source" is a bindingsource with it's DataSource set to a Tier Rate object that came from the grid's arctiveRow.ListObject, and "DefaultRevenueCode" is a string property of the TierRate object....

During the Form's Load event I set the Bindings for all of the controls.  This is where I get an error on the above mentioned line.  The error is:
     {"Can't access SelectedText unless the Editor is in edit mode."}

OK, I'm at a complete loss here... Any Ideas, on what I'm doing wrong?????

Thanks in advance,

Kevin Orcutt
VB Developer, AGS - client: Creative Microsystems, Inc.
OrcuttK @ civicacmi dot com

 

  • 45
    posted

    Never Mind!!!  I found what was the problem...

     

    Silly error on my part.