Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
i have a collection of items. and each item is having subitems collection. now how can i bind the collection of subtems of each item in the collection to a listbox ?. please help me.

Regards
Easwar
Posted

lets say your original collection is called Parent.
There is a Children collection inside this collection.

What you can try is code similar to
<combobox itemsource="{Binding Parent.Children}" />
.
 
Share this answer
 
v2
Comments
koteswararao_m 28-Jun-12 8:33am    
Hi abhinav

Thanks for your reply. but that does'nt solve my problem.

my collection is as fallows

item
{
collection<item> subitems;
.
.
.
.
}

collection<item> items

here datacontext is items. i need to set items.subitems (subitems from all items) which is not possible as told above.
[no name] 28-Jun-12 9:22am    
Show the code for what you have tried. What you just said does not make any sense.
You can use Converter[^].

In the Converter (Convert method), you can return the subitems.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900