Groups | Blog | Home
all groups > dotnet ado.net > july 2007 >

dotnet ado.net : Data Table Row (.net 2)


Dave T
7/6/2007 9:28:00 AM
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.

Milosz Skalecki [MCAD]
7/8/2007 4:16:00 AM
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

--
Milosz


[quoted text, click to view]
AddThis Social Bookmark Button