ASPX templates
Version 3.x > ASPX templates > Horizontal view of elements in a template View modes: 
User avatar
Member
Member
michael.karl.privat-aon - 12/21/2008 2:52:33 PM
   
Horizontal view of elements in a template
I create a new document type "Video" and i want to list it in an datalist or repeater-control:

<cms:CMSDataList ID="dlPhotoAlbums" runat="server" RepeatColumns="1" RepeatDirection="Horizontal" CellPadding="0" CellSpacing="15"
ClassNames="DK.Video" TransformationName="DK.Video.ListPreview" OnItemCommand="dlPhotoAlbums_ItemCommand">
</cms:CMSDataList>

--> So i get a vertical list displaying the items.

But what i really want is a horizontal list of the items with a horizontal scrollbar
I changed the attribute RepeatColumns to RepeatColumns="5". This is good, but i do not get a jorizontal scrollbar if the items do not fit in the screen.

Please help: What is the best way to list items with scrollbars? - Is it possible?

Thanks in advance! Michael

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 12/22/2008 5:00:05 AM
   
RE:Horizontal view of elements in a template
Hi Michael,

could you please check your CSS stylesheet? It seems it relates to your CSS design. You could test the DataList on our sample Corporate Site – it works correctly with your settings, the horizontal scrollbar appears if necessary.

Best regards,
Helena Grulichova

User avatar
Member
Member
michael.karl.privat-aon - 12/22/2008 5:36:10 AM
   
RE:Horizontal view of elements in a template
Hello Helena!

Do you mean the example "Listings and Viewers" - Datalist in the sample Corporate Site?

Yes, this is in principle the list i need, but in the sample there are 8 products in 2 rows.

I need a list with only 1 row and a scrollbar at the bottom of the list. (no horizontal scrollbar from the browser) so i can scroll through all products in 1 row isung the horzontal scrollbar.

I can not find a mistake in my stylesheet, but i will look forward to find it.

Best regards,
Michael

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 12/22/2008 6:11:31 AM
   
RE:Horizontal view of elements in a template
Hello Michael,

yes, I meant exactly that one.

You could set it e.g. Repeat columns: 10 and Page size: 10 then it will have only one row.

Best regards,
Helena Grulichova

User avatar
Member
Member
michael.karl.privat-aon - 12/22/2008 7:17:01 AM
   
RE:Horizontal view of elements in a template
Hello Helena!

I am so sorry to stress you again!

I had no property PageSize on my datalist. I used <cms:CMSDataList> ...
I looked on the sample code and after that i added <%@ Register Src="~/CMSWebParts/Viewers/cmsdatalist.ascx" TagName="cmsdatalist" TagPrefix="uc1" %> and the i used <uc1:cmsdatalist> ...
Then i had the propery PageSize. (Waht is the difference between cms:Datalist and uc1:cmsdatalist (form the Webparts?)
The code looks like that:
<uc1:cmsdatalist ID="CMSDataList1" runat="server" RepeatColumns="3" PageSize="3"
ClassNames="DK.Video" TransformationName="DK.Video.ListPreview">
</uc1:cmsdatalist>

I set the Property to the value but it doesn't work.


I tryed to change the value on the Corporate-Site example but it also doesnt' work.
The code looks like that:
<uc1:cmsdatalist runat="server" ID="cmsdatalist" Path="/%" ClassNames="cms.cellphone;cms.laptop;cms.pda" TransformationName="ecommerce.transformations.product_preview" RepeatColumns="4" PageSize="4" RepeatDirection="horizontal" RepeatLayout="table" PagingMode="querystring" PagerPosition="bottom" ResultsPosition="top" ShowEditDeleteButtons="True" Visible="false" />
- There are always more then 1 row.

Please, do you have an idea what i am doing wrong?

Thanks,
Michael

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 12/22/2008 7:31:32 AM
   
RE:Horizontal view of elements in a template
Hello Michael,

please use the property of CMSDataList: EnablePaging=“true“, too.

Best regards,
Helena Grulichova

User avatar
Member
Member
michael.karl.privat-aon - 12/22/2008 7:37:55 AM
   
RE:Horizontal view of elements in a template
Hello!

Thank you! This work fine.

Michael