<SfGrid @ref="DefaultGrid" DataSource="@_properties" AllowSelection="true" AllowSorting="false" >
<GridSelectionSettings Type="SelectionType.Multiple"></GridSelectionSettings>
<GridEvents RowDeselected="SelectionChanged" RowSelected="SelectionChanged" TValue="Property"></GridEvents>
<GridTemplates>
<DetailTemplate Context="detailContext">
@{
Property propertyContext = (detailContext as Property);
string imagePath = "/PropertyPictures/" + @propertyContext.Id + ".jpg";
<div class="row">
<div class="col-xl-2">
<img src=@imagePath width="100%" height="100px;" />
</div>
<div class="xol-xl-2">
<table>
<tr>
<td>
Bedrooms:
</td>
<td>
@propertyContext.Bedrooms
</td>
</tr>
<tr>
<td>
Bathrooms:
</td>
<td>
@propertyContext.Bathrooms
</td>
</tr>
<tr>
<td>
Garages:
</td>
<td>
@propertyContext.Garages
</td>
</tr>
<tr>
<td>
Spa:
</td>
<td>
@propertyContext.Spa
</td>
</tr>
<tr>
<td>
Pool:
</td>
<td>
@propertyContext.Pool
</td>
</tr>
</table>
</div>
</div>
<div class="row">
<div class="col-xl-2">
</div>
</div>
}
</DetailTemplate>
</GridTemplates>
<GridSortSettings>
<GridSortColumns>
<GridSortColumn Field="ProfitPercentages" Direction="SortDirection.Descending"></GridSortColumn>
</GridSortColumns>
</GridSortSettings>
<GridColumns>
<GridColumn Type="ColumnType.CheckBox" Width="50"></GridColumn>
<GridColumn Field=@nameof(Property.FullAddress) HeaderText="Address" CustomAttributes="@(new Dictionary<string, object>() {{"class", HeaderClass(nameof(Property.FullAddress))}})"></GridColumn>
<GridColumn Field=@nameof(Property.AskingPrice) HeaderText="Asking Price" Format="C0" CustomAttributes="@(new Dictionary<string, object>() {{"class", HeaderClass(nameof(Property.AskingPrice))}})"></GridColumn>
<GridColumn Field=@nameof(Property.ProjectedValue) HeaderText="Projected Value" Format="C0" CustomAttributes="@(new Dictionary<string, object>() {{"class", HeaderClass(nameof(Property.ProjectedValue))}})"></GridColumn>
<GridColumn Field=@nameof(Property.ProfitMonetary) HeaderText="Projected Profit" Format="C0" CustomAttributes="@(new Dictionary<string, object>() {{"class", HeaderClass(nameof(Property.ProfitMonetary))}})"></GridColumn>
<GridColumn Field=@nameof(Property.ProfitPercentages) HeaderText="Profit %" Format="P2" CustomAttributes="@(new Dictionary<string, object>() {{"class", HeaderClass(nameof(Property.ProfitPercentages))}})"></GridColumn>
</GridColumns>
</SfGrid>