nested repeaters - how to sort

Posted by Cristian Boariu on Stack Overflow See other posts from Stack Overflow or by Cristian Boariu
Published on 2010-03-24T09:11:26Z Indexed on 2010/03/24 9:13 UTC
Read the original article Hit count: 286

Filed under:
|

Hi guys, I have a table: Category with some sort of categories

 category1 
 category2
 category3

I have another table Subcategory which has a fk to Category. So, each category1 can have subcategoryB, subcategoryA, subcategoryZ.

Well... i've made two repeaters. The first one is binded to a linq data source which takes the categories from the parent table.

The children repeater is binded to that foreign key like: DataSource='<%# Eval("Subcategories_1s") %>'

So the result is:

category1
   subcategoryB
   subcategoryA
   subcategoryZ
category2 

etc. Well, the strange question is: how can i order the subcategories alphabetically? If i'd have binded the children repeater to a linq it would be easy. But in this case...?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about c#