StrataFrame Forum

ComboBox created at runtime not populating

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

By Andria Jensen - 6/16/2006

I am trying to create several controls for a dynamic form, one of which is a DevEx ComboBox.  I have the following code which puts the combo box on the form, but doesn't populate with any data.  The TextEdit I created before it works exactly as I would like for it to.  What am I missing here?

Dim fldIncrement As New DevEx.TextEdit
Dim cboCurrency As New DevEx.ComboBoxEdit
Dim PopSettings As New MicroFour.StrataFrame.UI.ListViewPopulationSettings

fldIncrement.BusinessObject = Me
fldIncrement.BindingField = "FloatIncr"

With cboCurrency
  .BusinessObject =
Me
 
.BindingField = "CurrencyType"
 
.BusinessObjectEvaluated = True
 
PopSettings.BusinessObjectType = "BBS.Biz.ChkSourceBO"
 
PopSettings.DisplayFieldNames.Add("CurrencyType")
  PopSettings.FormatString =
"{0}"
 
PopSettings.MethodToExecute = "FillAll;"
  PopSettings.ValueMember = "CurrencyType"
  .
PopulationDataSourceSettings = PopSettings
  .PopulationType = MicroFour.StrataFrame.UI.ListPopulationType.BusinessObject
End With

 

By Steve L. Taylor - 6/16/2006

Call the cboCurrency.Requery() method for population.
By Trent L. Taylor - 6/16/2006

Andria,

I agree with Steve, it looks like you are just missing the Requery call to reload the list.  Let me know if this doesn't work for you.