Home Forums WPF controls Xceed DataGrid for WPF FieldName syntax for sub-property?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #25520 |

    My datagrid’s itemsource is bound to a collection.
    The objects in the collection contain a property A that itself is an object, which has a property B.

    How can I tell a column that it should be using the property B?

    FieldName=”A.B”???

    FieldName is what I am supposed to use to bind data to a column… right?

    Please help ASAP… I am stuck until I get this.
    Buzz

    Imported from legacy forums. Posted by Buzz (had 1954 views)

    Xceed Support
    Member
    Post count: 5658

    The FieldName property identifies the field in the datatable whose values will be displayed in that column. The DisplayMemberBinding property determines the binding. That being said, what you could do is change the column’s CellContentTemplate to display B rather than A.

    E.g., {Binding Path=B}

    Imported from legacy forums. Posted by Jenny [Xceed] (had 2763 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.