Hi,
I am fairly new to object oriented programming, .net classes and WPF, so forgive me for maybe stupid questions.
I have collection of objects, and each object has several properties. I want to bind this collection to a Xceed DataGridControl.
This works fine for me:
myGrid.ItemsSource = myCollection;
What I want to do is
- Use different names for column headers - not myCollection [ i ] .SomeProperty
- Specify the properties that I want displayed - I don't want all properties (columns).
I can not provide a code snippet.
An analogy of my code would be you have a collection of "employees". Each employee has properties "FirstName" , "LastName" and "Gender".
I want to display this in the DataGridControl where:
- there is no Gender column
- Instead of FirstName only Name is displayed
- Instead of LastName Surname is displayed
My instinct tells me to simply generate a new collection, with altered property names and omitted columns, but looking at this technology..there's got to be a better way. I have read some articles on WPF's DataTemplating but it just doesn't get thru to me :(.
cheers