GridForeignColumn edit not working
I have a Grid, see code below, that uses a GridForeignColumn. This works great, however when changing the value in the edit dialog the value is not updated upon confirming. The value send to the backend code is the original value. The value displayed when opening the dialog matches is the correct value at that moment to the connection between the Id's seems to work fine.
<SfGrid @ref="GridRef" TValue="UserOrganisationRole" AllowFiltering="true" Query="@query">
<SfDataManager Adaptor="Adaptors.CustomAdaptor" AdaptorInstance=@typeof(MembersAdapter)></SfDataManager>
<GridEditSettings AllowAdding="true" AllowDeleting="true" AllowEditing="true" Mode="EditMode.Dialog" ShowDeleteConfirmDialog="true">
</GridEditSettings>
<GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.CheckBox"></GridFilterSettings>
<GridColumns>
<GridColumn Field="@nameof(UserOrganisationRole.Id)" Visible="false" IsPrimaryKey="true"></GridColumn>
<GridColumn Field="User.Name" HeaderText="Naam" TextAlign="TextAlign.Right" Width="120"></GridColumn>
<GridForeignColumn TValue="OrganisationRole" Field="@nameof(UserOrganisationRole.OrganisationRoleId)" ForeignKeyField="Id" HeaderText="Rol" ForeignKeyValue="Name" Width="150" ForeignDataSource="@Roles">
</GridForeignColumn>
<GridColumn Field="@nameof(UserOrganisationRole.CanRead)" HeaderText="Weergeven" DisplayAsCheckBox="true" Width="150">
</GridColumn>
<GridColumn Field="@nameof(UserOrganisationRole.CanEdit)" HeaderText="Inschrijvingen wijzigen" DisplayAsCheckBox="true" Width="150">
</GridColumn>
<GridColumn Field="@nameof(UserOrganisationRole.CanDelete)" HeaderText="Inschrijvingen Verwijderen" DisplayAsCheckBox="true" Width="150">
</GridColumn>
<GridColumn Field="@nameof(UserOrganisationRole.CanFinancial)" HeaderText="Financieel" DisplayAsCheckBox="true" Width="150">
</GridColumn>
<GridColumn Field="@nameof(UserOrganisationRole.CanManageEvents)" HeaderText="Show annuleren" DisplayAsCheckBox="true" Width="150">
</GridColumn>
<GridColumn Field="@nameof(UserOrganisationRole.CanManageOrganisation)" HeaderText="Organisatie wijzigen" DisplayAsCheckBox="true" Width="150">
</GridColumn>
<GridColumn HeaderText="Acties" Width="150" Visible="@isAdmin">
<GridCommandColumns>
<GridCommandColumn Type="CommandButtonType.Edit" ButtonOption="@(new CommandButtonOptions() { IconCss = "e-icons e-edit", CssClass = "e-flat" })"></GridCommandColumn>
<GridCommandColumn Type="CommandButtonType.Delete" ButtonOption="@(new CommandButtonOptions() { IconCss = "e-icons e-delete", CssClass = "e-flat" })"></GridCommandColumn>
</GridCommandColumns>
</GridColumn>
</GridColumns>
</SfGrid>
Hi
Timo,
Thank you for reaching out to us.
we have reviewed the issue you reported and
unfortunately, we were unable to reproduce the problem in our most recent
version (20.4.0.43). We have attached a sample solution for your
reference.
If the issue persists, please provide us with the following information to help us further investigate the problem:
- Share the NuGet version with us.
- A simple, reproducible sample of the issue
- If possible, please try to replicate the issue using the attached sample.
We appreciate your cooperation and look forward to resolving this issue as quickly as possible.
Regards,
Prathap S
Attachment: DataGrid_a4f1a279.zip
- 1 Reply
- 2 Participants
-
TI Timo
- Jan 16, 2023 12:43 PM UTC
- Jan 17, 2023 12:52 PM UTC