I was wondering if there is a better approach than this one?
http://www.telerik.com/help/aspnet-ajax/treeview-data-binding-loading-related-tables.html
I have two tables (Countries and TvChannels) there and the following query:
Is there a better way to utilize this query instead so i can get the expected result e.g.
- United States
---- Channel No. 1
---- Channel No. 2
- United Kingdom
---- Channel No. 1
---- Channel No. 2
- Denmark
---- Channel No. 1
---- Channel No. 2
etc.
http://www.telerik.com/help/aspnet-ajax/treeview-data-binding-loading-related-tables.html
I have two tables (Countries and TvChannels) there and the following query:
SELECT
Ct.CountryName, Tv.ChannelID, Tv.ChannelName
FROM
TvChannels
AS
Tv
INNER
JOIN
Countries
AS
Ct
ON
Tv.CountryID = Ct.CountryID
WHERE
Tv.IsActive = 1
Is there a better way to utilize this query instead so i can get the expected result e.g.
- United States
---- Channel No. 1
---- Channel No. 2
- United Kingdom
---- Channel No. 1
---- Channel No. 2
- Denmark
---- Channel No. 1
---- Channel No. 2
etc.