ASPX templates
Version 5.x > ASPX templates > CMSRepeater with DataSets View modes: 
User avatar
Member
Member
eric.rovtar-hudsonchapel - 9/8/2010 1:49:38 PM
   
CMSRepeater with DataSets
Hi!

Is there a way to use the CMSRepeater with a DataSet retrieved from the CMS Database?

Thanks!

-Eric

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 9/10/2010 4:10:03 AM
   
RE:CMSRepeater with DataSets
Hello,

You can use a data source webpart (for example this) and set the repeater to display the content from the datasource by setting the "Data source name" property.

Best regards,
Boris Pocatko

User avatar
Member
Member
eric.rovtar-hudsonchapel - 9/11/2010 5:33:52 PM
   
RE:CMSRepeater with DataSets
So let me give a complete scenario:

I have 3 custom tables: customtable.podcasts, customtable.series, customtable.speakers. I want to perform the following SQL query:

SELECT customtable.podcasts.id AS id, customtable.podcasts.title AS title, customtable.series.title AS seriesTitle, customtable.speakers.name AS speaker
FROM customtable.podcasts, customtable.series, customtable.speakers
WHERE customtable.podcasts.seriesID = customtable.series.ID AND customtable.podcasts.speakerID = customtable.speakers.ID;

I want to the attach this to a DataGrid.

How would I best do this?

Thanks!

-Eric

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 9/29/2010 9:42:29 PM
   
RE:CMSRepeater with DataSets
Hello,

For this particular scenario, it would be best to use QueryDataGrid control from our Controls library. See more information about its usage in:

QueryDataGrid control article

The article describes which property to use for your custom query (QueryName) and shows and example on how to map the columns.

Hope this will help.

Regards,
Zdenek