Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BindingSourceDisplayMember of combobox
Message
 
To
23/04/2004 05:16:50
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00897497
Message ID:
00897545
Views:
15
Chen, you could do something like this in your business object that returns your list of employee names:
   Public Function GetEmployeeNameList(ByVal dataOwnerID As Integer) As DataSet

        ' Get a reference to the data access object
        Dim dao As mmDataAccessBase = Me.GetDataAccessObject()

        ' Build the SQL command string
        Dim mySql As String
        mySql = "SELECT EmployeeID, (NameFirst + ' ' + NameLast) AS EmployeeName From Employee"

        ' Get a DataSet filled with the result set
        Return Me.GetDataSet(mySql)
Then set you BindingSourceDisplayMember to the EmployeeName column in the dataset returned by you business object.
Carl Olson, Jr.
CEO, Founder
Cerelogic, Inc.

www.cerelogic.com

"Applying rocket science to business."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform