WPF ItemsControl binding and the item order?

Up vote 0 down vote favorite share g+ share fb share tw.

I have ItemsControl in a WPF application, which is bind to an array of objects. And I am using ItemTemplate to render the list. I want to display for each item in the list the item order, like for example Customer 1 Name : xxxxx Age: 9999 Customer 2 Name : yyyy Age: 8888 Any idea how to do it Thanks wpf data-binding datatemplate itemscontrol link|improve this question asked Nov 27 '09 at 17:45gkar383419 49% accept rate.

You can do this by using a CollectionViewSource. The CollectionViewSource gives you the ability group and / or sort your ItemsSource. It does this by creating a "view" which is a separate copy of your items source with your grouping and sorting applied to it.

This allows you to show your data in multiple different groupings or sortings on the same page while still only having one underlying source collection.

It happened to a correct answer on his other question as well... – Dabblernl Nov 28 '09 at 14:58 @Foovanadil, I agree with you, sometimes kids just put down vote because they can and they like, and no one asks for any explanation. I think comment on downvote should be compulsory. – Akash Kava Nov 29 '09 at 7:11 Totally agree.

I think if you are going to down vote something you should explain yourself. I know I do if I down vote something – Foovanadil Nov 30 '09 at 4:38.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions