ASPX templates
Version 6.x > ASPX templates > A nested CMSRepeater that sorts Document Names into alphabetical sections View modes: 
User avatar
Member
Member
whiplash - 10/22/2012 8:13:53 AM
   
A nested CMSRepeater that sorts Document Names into alphabetical sections
Hi Guys,

I would appreciate some of your input and suggestions.

I have to list out 'documents' in a repeater, but I have to also categorise them in alphabetical order. For example, all documents (names) beginning with 'A' will be listed under the 'A' section and so on ...

I have looked into the nested repeater threads ... but is this definitely what I need to categories them into the right section/div?

This could probably be done using javascript, but could end up quite messy ... any ideas?

Thanks

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 10/24/2012 2:24:23 AM
   
RE:A nested CMSRepeater that sorts Document Names into alphabetical sections
Hi,


you can use the nested repeaters and use a dynamic Where condition like:

DocumentName LIKE <eval the proper letter here>%

We use a bit similar index in Site manager -> Administration -> Users, but not using nested repeaters because it displays only all records or one letter only. However, you can take inspiration there. You can see its code in:

~\CMSModules\Membership\Controls\Users\UserFilter.ascx.cs

methods:

CreateAlphabetTable()
AdvancedSearch()


Best regards,
Helena Grulichova

User avatar
Member
Member
whiplash - 10/24/2012 5:22:55 AM
   
RE:A nested CMSRepeater that sorts Document Names into alphabetical sections
Hi Helena

Thankyou for the reply :)

I'll get back to you when I get a chance to work on this again.