Hi,
1) Sorting Customer.FirstName.
Sorting is done on the FieldName of the Column. If the fieldName is "Customer", you can use a CellContentTemplate to display Customer.FirstName or Customer.LastName, but sorting will be done on Customer (DataGrid won't know how to sort). You could use DataGridItemProperties and add a SortComparer like examples here : http://doc.xceedsoft.com/products/XceedWpfDataGrid/#Sorting_Data.html.
But in the end, it is now the best option. Its is better to use 1 column per property : Column1.FieldName = Customer.FirstName, Column2.FieldName = Customer.LastName...This way, sorting will work and all DataGrid options willl work (inserting Customer.FirstName instead of Customer, filtering by Customer.FirstName instead of by Customer, editing Customer.FirstName instead of Customer...). You will not by pass the DataGrid's provided technology.
1) Sorting Customer.FirstName.
Sorting is done on the FieldName of the Column. If the fieldName is "Customer", you can use a CellContentTemplate to display Customer.FirstName or Customer.LastName, but sorting will be done on Customer (DataGrid won't know how to sort). You could use DataGridItemProperties and add a SortComparer like examples here : http://doc.xceedsoft.com/products/XceedWpfDataGrid/#Sorting_Data.html.
But in the end, it is now the best option. Its is better to use 1 column per property : Column1.FieldName = Customer.FirstName, Column2.FieldName = Customer.LastName...This way, sorting will work and all DataGrid options willl work (inserting Customer.FirstName instead of Customer, filtering by Customer.FirstName instead of by Customer, editing Customer.FirstName instead of Customer...). You will not by pass the DataGrid's provided technology.