|
<GridForeignColumn Field=@nameof(CustomerViewModel.DivsId) HeaderText="División" TValue="Divs" ForeignKeyField="Id" ForeignKeyValue="DivName" AutoFit="true">
<ChildContent>
<SfDataManager Url="http://localhost:64956/odata/divs" Adaptor="Adaptors.ODataV4Adaptor" CrossDomain="true"></SfDataManager>
</ChildContent>
<EditTemplate>
<span>División</span>
<SfDropDownList ID="DivsId" @bind-Value="@((context as CustomerViewModel).DivsId)" TItem="Divs" TValue="int" Placeholder="División">
<SfDataManager Url="http://localhost:64956/odata/divs" Adaptor="Adaptors.ODataV4Adaptor" CrossDomain="true" Offline="true"></SfDataManager>
<DropDownListFieldSettings Value="Id" Text="DivName"></DropDownListFieldSettings>
</SfDropDownList>
</EditTemplate>
</GridForeignColumn>
<GridForeignColumn Field=@nameof(CustomerViewModel.StoreGroupsId) HeaderText="Grupo" TValue="StoreGroups" ForeignKeyField="Id" ForeignKeyValue="GroupName" AutoFit="true">
<ChildContent>
<SfDataManager Url="http://localhost:64956/odata/groups" Adaptor="Adaptors.ODataV4Adaptor" CrossDomain="true"></SfDataManager>
</ChildContent>
<EditTemplate>
<span>Grupo</span>
<SfDropDownList ID="StoreGroupsId" @bind-Value="@((context as CustomerViewModel).StoreGroupsId)" TItem="StoreGroups" TValue="int?" Placeholder="Grupo">
<SfDataManager Url="http://localhost:64956/odata/groups" Adaptor="Adaptors.ODataV4Adaptor" CrossDomain="true" Offline="true"></SfDataManager>
<DropDownListFieldSettings Value="Id" Text="GroupName"></DropDownListFieldSettings>
</SfDropDownList>
</EditTemplate>
</GridForeignColumn>
|
|
<SfGrid ID="Grid" @ref="Grid" AllowFiltering="true" TValue="CustomerViewModel" Toolbar="@ToolbarItems" Height="100%" Query="@GridQuery" AllowPaging="true" AllowSorting="true">
. . . . . . . . .
</SfGrid>
@code{
public Query GridQuery { get; set; } = new Query().Expand(new List<string>() { "Div", "Group" }).Select(new List<string> { "Id", "DivsId", "StoreGroupsId", "Gender", "Name" });
SfDataManager dm { get; set; }
|