Hi All,
I have tried to look for this info in the forums and i'm sure it is there but I can't find it.
I have a table called Artist and the Artist has a relationship with ArtistRelated. Both tables are displayed below:
Artist
ArtistID PK int
Name string
ArtistRelated
ArtistID PK int
RelatedID PK int
The RelatedID is an ArtistID in the table Artist, self referencing as so to speak.
In my form I read the entity like below and set the datagrid to it's relationship like so:
ArtistEntity artist = new ArtistEntity(477707);
gridControl1.DataSource = artist.GetMultiArtistRelationship(true);
Now this works great and I get my grid filled with ArtistID and RelatedID like so:
ArtistID RelatedID
477707 583483
477707 383834
477707 383894
What I want to do is fill my grid with the Artist Name associated with the RelatedID. Do I have to do through the collection one at a time and read the entity Artist for the Name; if so how does do I do that? or is there a better way?
A code snippet would be great if possible as I will be doing this a lot.
Thanks in advance.
Geoff.