cjard
Well-known member
- Joined
- Apr 25, 2006
- Messages
- 7,081
- Programming Experience
- 10+
Suppose I have an object that has 3 string properties and a String array proeprty.
I'd like to facade this object as a datatable such that the number of rows is equal to the length of the array and the number of columns is 4. The column headers would take the names of the properties that they show and the row data for the 3 string properties is repeated for the whole column in the case of the single strings, and for the array, each element individually?
For example, my object has
Album="The Album"
Artist="The Artist"
Genre="The Genre"
Tracks() = New String(){"Track1","track2","track3"}
and i'd like:
and hence I can assign it to a datagrid, edit it etc..
[/FONT][/FONT][/FONT]
I'd like to facade this object as a datatable such that the number of rows is equal to the length of the array and the number of columns is 4. The column headers would take the names of the properties that they show and the row data for the 3 string properties is repeated for the whole column in the case of the single strings, and for the array, each element individually?
For example, my object has
Album="The Album"
Artist="The Artist"
Genre="The Genre"
Tracks() = New String(){"Track1","track2","track3"}
and i'd like:
VB.NET:
[FONT=Courier New][FONT=Courier New][FONT=Courier New][FONT=Courier New][B]Album | Artist | Genre | Tracks[/B][/FONT]
[/FONT][FONT=Courier New][FONT=Courier New]The Album | The Artist | The Genre | Track1[/FONT]
[FONT=Courier New]The Album | The Artist | The Genre | Track2[/FONT]
[FONT=Courier New]The Album | The Artist | The Genre | Track3[/FONT]
and hence I can assign it to a datagrid, edit it etc..
[/FONT][/FONT][/FONT]