data row class (.net 2)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I have a typed data set with columns ColumnA and ColumnB (both strings) in
a table, I was thinking that I could do something like this


Partial Public Class TheTDS

....

Partial Public Class TheDataTableRow

Private ReadOnly Property ConcatenatedColumn() As String
Get
Return ColumnA & ", " & ColumnB
End Get
End Property

End Class

End Class


Then I want to bind that property to, say, a web list box control. Of
course this doesn't work, but I want to believe that it is possible.

Does anyone know where I might find out how to accomplish this?
 
Hi Dave,

Add extra column to the table (right click on the table in dataset designer
view) and call it ConcatenatedColumn. In the expression field enter ColumnA +
', ' + ColumnB.
Should work.

Hope this helps
 
Thanks, It does work but now I can't get it to dis play in a list box which
is bound to an object data source, even though the column shows up in the
list box's data text field property
 
Back
Top