This is a migrated thread and some comments may be shown as answers.

GridView with Multi Source

0 Answers 33 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Thangalskhmi
Top achievements
Rank 1
Thangalskhmi asked on 20 May 2011, 10:59 AM


Hello,


Can you please tell me, how to bind the two types of object details in the Grid View using Data Table as ItemsSource?


For example:


I have a Class A which has property A1, A2 and Class B which has property B1 and B2.


        public class A

        {

            public string A1 { get; set; }

            public string A2 { get; set; }

        }

        public class B

        {

            public string B1 { get; set; }

            public string B2 { get; set; }

        }

I would like to display all the properties from Class A and one property (i.e. B1) from Class B as shown in below.

       //======================

       //  A1  |  A2   | B1

       //======================

       //   a1  | a2    | b1


How could we achieve this without creating View Model?


Thanks, 
Thanga

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Thangalskhmi
Top achievements
Rank 1
Share this question
or