The title says it all. I am trying to return a data table from my Business Layer. The table returns an ID and a combination of [Code + ' - ' + Name] as the Name. this is for a DropDownList, hence the multiple fields to one column so i can display both in a single field.
I have been able to build the typedlistdao with either/or, but i haven't seen anything about a combination
Here's my current code. Any suggestions would be great.
Dim sorter As New SortExpression()
sorter.Add(SortClauseFactory.Create(LocationFieldIndex.Name, SortOperator.Ascending))
Dim dao As New TypedListDAO
Dim objFields As New ResultsetFields(2)
objFields.DefineField(LocationFieldIndex.Id, 0, "ID")
'This needs to be combined with Code to create Code + ' - ' + Name
objFields.DefineField(LocationFieldIndex.Name, 1, "Name")
Dim dt As New DataTable("Locations")
dao.GetMultiAsDataTable(objFields, dt, 0, sorter, LocationFields.DivisionId = DivisionID, _
Nothing, False, Nothing, Nothing, 0, 0)
Return dt