StrataFrame Forum

Regarding Combo Box

http://forum.strataframe.net/Topic20534.aspx

By Mike Rogers - 11/3/2008

Hi

I am having problems with the combo box that is filled by the business object.  I then would like to be able to tell the formload do the following.  the problem is the combo box does not have all of the records yet.  If I place a button on the form tell the combo box  cboScheduleType.SelectedValue = 1 then it works.

Please help

Thanks Mike

With LK_ScheduleActivityBO1

      .FillScheduleTable(m_intQueryedID, m_intContactRecordID, m_ScheduleType)

      Select Case m_intLoad

                 Case FormLoadBy.Record_Edit

                            .SeekToPrimaryKey(m_intRecordID) ' Move to the requested edit record

                            .Edit()

                Case FormLoadBy.Record_New

                            .Add()

                            .Edit()

End Select

 cboScheduleType.SelectedValue = 1    '  m_CallType

End With

By Greg McGuffey - 11/4/2008

I'm not quite following what your problem is, but if you are filling the combo from a BO, the code below would best be put into the ParentFormLoading event handler. Also, you'll want to make sure you setup the initializationpriority (I think that is the property name) of both the BO and the combo such that the BO is filled first.
By Greg McGuffey - 11/4/2008

Actually, as I look at the code, you'd likely want to put the Fill code in ParentFormLoading and the other code in FormLoad. The idea is to have all data loaded by the time you get to FormLoad, by using the ParentFormLoading event to do the data filling of BOs and combos/lists, etc.