Welcome to the Xceed Community Sign in | Join | Help
Community Search  

.net newbie needs help with xceed's DataGridControl

Sort Posts: Previous Next
  •  08-11-2008, 8:01 AM Post no. 13996

    .net newbie needs help with xceed's DataGridControl

    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

    1. Use different names for column headers - not myCollection [ i ] .SomeProperty
    2. 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

    Filed under:
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.