DevExpress ComboBoxEdit Population Problem


Author
Message
Brad Vick
Brad Vick
StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)StrataFrame Novice (51 reputation)
Group: Forum Members
Posts: 33, Visits: 88
I have a combobox that I am attempting to load using a business object. I am getting the error below and cannot figure out how to track it down. I have done this many times before, and have other comboboxes on other forms that use this same exact population settings. It appears as though it is erroring out when attempting to find BBS.Biz.Entities.ClientsBO. I have a reference to this dll in my project. Any help tracking this problem would be appreciated.







List Population Settings:



ListPopulationSettings6.BusinessObjectType = "BBS.Biz.Entities.ClientsBO"

ListPopulationSettings6.DisplayFieldNames.AddRange(New String() {"Name", "ClientNo"})

ListPopulationSettings6.FormatString = "{0} ({1})"

ListPopulationSettings6.MethodToExecute = "FillAll;"

ListPopulationSettings6.ValueMember = "ClientKey"



Error:



1/24/2007 11:15:46 AM

Source: mscorlib

Message: Value cannot be null.

Parameter name: type

Stack: at System.Activator.CreateInstance(Type type, Boolean nonPublic)

at System.Activator.CreateInstance(Type type)

at MicroFour.StrataFrame.UI.Windows.Forms.ListControl.PopulateComboFromBusinessObject(IListControl lstControl, Object[] Parameters)

at MicroFour.StrataFrame.UI.Windows.Forms.ListControl.PopulateCombo(Control lstControl, Object[] Parameters)

at MicroFour.StrataFrame.UI.Windows.Forms.DevEx.ComboBoxEdit.PopulateCombo(Object[] Parameters)

at MicroFour.StrataFrame.UI.Windows.Forms.DevEx.ComboBoxEdit.Requery()

at MicroFour.StrataFrame.UI.Windows.Forms.DevEx.ComboBoxEdit.InitializeObject()

at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.InitializeFormLoadObjects()

at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.OnLoad(EventArgs e)

at System.Windows.Forms.Form.OnCreateControl()

at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

at System.Windows.Forms.Control.CreateControl()

at System.Windows.Forms.Control.WmShowWindow(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

at System.Windows.Forms.ContainerControl.WndProc(Message& m)

at System.Windows.Forms.Form.WmShowWindow(Message& m)

at System.Windows.Forms.Form.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Reply
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, .NET uses a lazy loading scheme: DLLs are not loaded until an type that references them is needed.  However, it is quite strange that they did not show up in the GetReferencedAssemblies() method call... unless that call only returns the referenced assemblies that are currently loaded into the AppDomain.

If you have this problem again... say with a business object that comes from an assembly where this is the only place you're using it, you can provide the full assembly qualified type name for the type and .NET will resolve it, like this:

MicroFour.StrataFrame.Data.SqlDataSourceItem, MicroFour StrataFrame Base, Version=1.5.0.0, Culture=neutral, PublicKeyToken=SomeHexValue

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search