I have data from a CD or Record currently setup like this:
class Release //class containing all details of release
{
public string Artist; //Release Artist
public string Title; //Release Title
public string Released; //Released (Date)
public Image Image; //Image
private List<Track> trackList = new List<Track>(); //List containing tracks
public List<Track> TrackList
{
get
{
return trackList;
}
}
//CONSTRUCTOR
public Release()
{
//Initialize strings to empty strings
Artist = "";
Title = "";
Released = "";
Image = null;
}
class Track
{
public string Position;
public string Title;
public string TrackArtist;
public Track()
{
//Initialize strings
Position = "";
Title = "";
TrackArtist = "";
}
}
This works fine as I don't know how many tracks there are when I populate them so I can just add a new item to the list as each one is found.
However I can't work out how to get my Tracklist into the DataGridView without manually populating it cell by cell.
What would be a better way to structure the data?
Thanks in advance.