-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMainPage.xaml
26 lines (25 loc) · 1.48 KB
/
MainPage.xaml
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
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:dx="http://schemas.devexpress.com/maui"
xmlns:local="clr-namespace:ValidateFormEvent"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
ios:Page.UseSafeArea="true"
x:Class="ValidateFormEvent.MainPage">
<ContentPage.BindingContext>
<local:TestOrderRepository/>
</ContentPage.BindingContext>
<dx:DataGridView x:Name="grid" ItemsSource="{Binding Orders}"
RowTapCommand="{Binding Source={RelativeSource Mode=Self}, Path=Commands.ShowDetailEditForm}"
DetailEditFormTemplate="{DataTemplate local:OrderEditForm}">
<dx:DataGridView.Columns>
<dx:TextColumn FieldName="Product.Name" Caption="Product" />
<dx:NumberColumn FieldName="Product.UnitPrice" Caption="Price" DisplayFormat="C0"/>
<dx:NumberColumn FieldName="Quantity" />
<dx:NumberColumn FieldName="Total"
UnboundType="Integer" UnboundExpression="[Quantity] * [Product.UnitPrice]"
IsReadOnly="True" DisplayFormat="C0" />
<dx:DateColumn FieldName="Date" DisplayFormat="d" />
<dx:CheckBoxColumn FieldName="Shipped" />
</dx:DataGridView.Columns>
</dx:DataGridView>
</ContentPage>