How do you relate two grids in a master/detail arrangment when you have a composite key? I was trying to use the same technique that is used in the Telerik trainer "RadGrid Related Tables" session, by simply adding the additional field to the where clause on the select for my details table, but doing this does not return any records in the details grid. So the select looks like this
SELECT
[PrcsName],
[MsgCode],
[MSGBody],
[ToEmailAddress],
[FromEmailAddress],
[EmailSubject],
[EmailAttachmentName],
[MailHost],
[SendEmailCode]
FROM [EsmEmailInfo]
WHERE
(([PrcsName] = @PrcsName) AND ([MsgCode] = @MsgCode))
I know the relationship/data is valid (the composite key is PrcsName + MsgCode) as I can do a straight join using the same criteria and get back all the data I need. If I use a single column from the composite key, it'll return data to the detail grid, but it doesn't return the results I want,,,I get too much data back.
If I have a set of tables with a single field making up the primary/foreign key, it works great, but so far when I've tried to use a composite key it doesn't work. Is there another way I should solve this?
Thanks,
Byron (telerik newbie)
SELECT
[PrcsName],
[MsgCode],
[MSGBody],
[ToEmailAddress],
[FromEmailAddress],
[EmailSubject],
[EmailAttachmentName],
[MailHost],
[SendEmailCode]
FROM [EsmEmailInfo]
WHERE
(([PrcsName] = @PrcsName) AND ([MsgCode] = @MsgCode))
I know the relationship/data is valid (the composite key is PrcsName + MsgCode) as I can do a straight join using the same criteria and get back all the data I need. If I use a single column from the composite key, it'll return data to the detail grid, but it doesn't return the results I want,,,I get too much data back.
If I have a set of tables with a single field making up the primary/foreign key, it works great, but so far when I've tried to use a composite key it doesn't work. Is there another way I should solve this?
Thanks,
Byron (telerik newbie)