-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIndex.razor
More file actions
33 lines (28 loc) · 875 Bytes
/
Index.razor
File metadata and controls
33 lines (28 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@page "/"
@using GridPartialLoading.Data
@inject WeatherForecastService ForecastService
<h2>DevExpress Grid</h2>
@if(forecasts == null) {
<p><em>Loading...</em></p>
} else {
<DxGrid Data="@forecasts"
AllowSelectRowByClick="true"
SelectionMode="GridSelectionMode.Single">
<Columns>
<DxGridDataColumn FieldName="Date" />
<DxGridDataColumn FieldName="Summary" />
</Columns>
<DetailRowTemplate Context="LineItem">
@{
var date = ((WeatherForecast)LineItem.DataItem).Date;
}
<DetailContent Date="date" />
</DetailRowTemplate>
</DxGrid>
}
@code {
private WeatherForecast[]? forecasts;
protected override async Task OnInitializedAsync() {
forecasts = await ForecastService.GetForecastAsync(DateTime.Today);
}
}