<SfGrid @ref="@Grid" TValue="Order" AllowFiltering="true" AllowPaging="true" Height="315">
<SfDataManager AdaptorInstance="@typeof(CustomAdaptor)" Adaptor="Adaptors.CustomAdaptor"></SfDataManager>
<GridColumns>
<GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" TextAlign="TextAlign.Right" Width="120"></GridColumn>
<GridColumn Field=@nameof(Order.CustomerID) HeaderText="CustomerID" Width="150">
<FilterTemplate>
<SfDropDownList Placeholder="Customer Name" ID="CustomerID" ShowClearButton="true" Value="@((string)(context as PredicateModel).Value)" DataSource="@Dropdown" TValue="string" TItem="Data">
<DropDownListEvents ValueChange="@CustomerChange" TValue="string"></DropDownListEvents>
<DropDownListFieldSettings Value="CustomerID" Text="CustomerID"></DropDownListFieldSettings>
</SfDropDownList>
</FilterTemplate>
</GridColumn>
<GridColumn Field=@nameof(Order.OrderDate) HeaderText=" Order Date" Format="d" Type="ColumnType.Date" TextAlign="TextAlign.Right" Width="130"></GridColumn>
<GridColumn Field=@nameof(Order.Freight) HeaderText="Freight" Format="C2" TextAlign="TextAlign.Right" Width="120"></GridColumn>
<GridColumn Field=@nameof(Order.FirstName) HeaderText="FirstName" Width="150">
<FilterTemplate>
<SfDropDownList Placeholder="First Name" ID="First" ShowClearButton="true" Value="@((string)(context as PredicateModel).Value)" DataSource="@Dropdown2" TValue="string" TItem="Data">
<DropDownListEvents ValueChange="@NameChange" TValue="string"></DropDownListEvents>
<DropDownListFieldSettings Value="CustomerID" Text="CustomerID"></DropDownListFieldSettings>
</SfDropDownList>
</FilterTemplate>
</GridColumn>
</GridColumns>
</SfGrid>. . . .. .
|