Getting a field from a Collection in a column
Im searching for a way to get a column from a collection inside a
collection which is the source of my grid.
Like this:
<dxg:GridControl Grid.Row="0" Grid.Column="0"
ItemsSource="{tools:ValidationBinding Model.Costs}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Costs.Description" Header="Description" />
<dxg:GridColumn FieldName="Costs.CurrencyAbbrevation" />
</dxg:GridControl.Columns>
My source of my grid is Model.Costs and this collection has another
collection Costs. I need the Description field from that collection. Any
idea's?
Overview:
This is the source of the grid:
public virtual ObservableCollection<ShipmentLineCost> Costs { get; set; }
This also contains an observablecollection:
public virtual ObservableCollection<SettlementCost> Costs { get; set; }
And I want the Description value from it in my grid:
public string Description { get { return (Product == null) ? "" :
Product.Description + ";" + SettlementUnit.Description + ";" +
CurrencyAbbreviation; } } –
Greets
No comments:
Post a Comment