nested repeaters - how to sort
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 subcategorie开发者_StackOverflows alphabetically? If i'd have binded the children repeater to a linq it would be easy. But in this case...?
Solved with this example !
Of course, no more linq data source, automatically binded, but used DataSet and relations. Check the above link for further informations.
精彩评论