Odd Error on binding combobox

kcnielsen

New member
Joined
Aug 26, 2005
Messages
3
Programming Experience
5-10
I have an MDI application that is giving me an unusual error related to binding comboboxes to a local dataset (initialized on app open for lookup tables storage).

The issue is related to how I open the form. form.show() works as expected and the combobox displays the list. But if I open the form as dialog from.showDialog() the list consists of a series of "System.data.dataRowView" items equal to the number of records.

Code used to bind cbo in form's load

with cbo
.ValueMember = "RecordID"
.DisplayMember = "ListItemField"
.DataSource = cDataLayer.Lookups.TableName
end with

cDataLayer is the object that exposes the dataset tables

Code to open form that works properly

Dim frm as New frmName
frm.MDIParent = Me
frm.Show()

Code that causes issue

Dim frm as New frmName
frm.ShowDialog(Me) -- I have tried it without using the overload as well

Why is this?
 
Back
Top