General information
Category:
The Mere Mortals .NET Framework
Tim,
At the beginning of this particular form's code, at the top of the class, I've included the following lines:
Public oReportCat as New Bus.ReportCatalog
Public dtReportCat as DataTable = oReportCat.GetAllData()
Public dvReportCat as DataView = me.dtReportCat.DefaultView
...so, yes, dtReportCat is a DataTable
The workaround in the form load method didn't intentionally avoid using the mmListBox properties. We're pretty new to MM.Net here and I apparently grabbed the first thing out of IntelliSense that made some sense. It also worked, by the way.
Having received your last note, I went back and tried the following code in the form's load method:
me.dtReportCat = oReportCat.GetAllData()
me.lstReportCat.BindingSource = me.dvReportCat
me.lstReportCat.BindingSourceDisplayMember = "strReportName"
me.lstReportCat.BindingSourceValueMember = "strReportFile"
me.lstReportCat.Enabled = True
me.optAllReports.Select()
This gives me an error at the line where the binding source is assigned because dvReportCat is a view and can't be converted to a string, which the bindingSource property expects. Does the same thing if I use dtReportCat.
If I remove the BindingSource line, I don't get an immediate error, but every line in the list box shows the same thing, specifically:
System.Data.DataRowView
I don't know what we're doing wrong. I be happy if we've just been stupid and have missed something obvious.
Any further clues?
Thanks,
Frank
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only