Edit data in a column doesn't update data

When an user want to modify the column with coefQualite, the edit inline show up. After it, user can use arrow to decrease or increase the value and use "Enter" key to give value. After it, the edit inline disappear but the value doesn't update to the new value chose by the user.

I don't understand why. I did use @bind-value but same situation, did use an edittemplate with a function on valuechange, but same situation.


<SfGrid @ref="Grid" DataSource="@CategorieElement" TValue="ElementCategorie" ID="ElementGrid" Width="100%" AllowSorting="true">
            <GridEditSettings AllowAdding="true" AllowEditing="true"></GridEditSettings>
            <GridEvents OnActionBegin="AddedElement" Created="SortElement" TValue="ElementCategorie"></GridEvents>
            <GridColumns>
                <GridColumn Field="IdxElement" Visible="false" IsPrimaryKey="true"></GridColumn>
                <GridColumn Field="Element.Nom" HeaderText="Element" Width="25%">
                    <EditTemplate>
                        <SfDropDownList TValue="string" TItem="ElementCategorie" @bind-Value="@((context as ElementCategorie).Element.Nom)" AllowFiltering="true" DataSource="@NotInCat">
                            <DropDownListFieldSettings Value="Element.Nom" Text="Element.Nom"></DropDownListFieldSettings>
                        </SfDropDownList>
                    </EditTemplate>
                    <Template>
                        @{
                            var elem = (context as ElementCategorie);
                                <span style="cursor:pointer; font-weight:500;" @onclick="@(() => { DetailRow(elem); })">@elem.Element.Nom</span>
                        }
                    </Template>
                </GridColumn>
                <GridColumn Field="@(nameof(ElementCategorie.UUID))" Width="20%" HeaderText="Nombre d'opérations" TextAlign="TextAlign.Center" AllowAdding="false" AllowEditing="false">
                    <Template>
                        @{
                            var elem = (context as ElementCategorie);
                            <span>
                                <span style="font-weight:600;">@CurrentCategorie.Operations.Where(op => op.IdxElement == elem.IdxElement).Count() </span>
                            </span>}
                        </Template>
                </GridColumn>
                <GridColumn Field="@(nameof(ElementCategorie.CoefQualite))" Width="15%" HeaderText="Coefficient Qualité" TextAlign="TextAlign.Center" AllowAdding="false" AllowEditing="true">
                    <Template>
                        @{
                            var elem = (context as ElementCategorie);
                            <span style="margin-right:5px;">@elem.CoefQualite</span>
                        }
                    </Template>
                </GridColumn>
                <GridColumn Field="@(nameof(ElementCategorie.Quantite))"  Width="15%" HeaderText="Quantité d'éléments" EditType="EditType.NumericEdit" TextAlign="TextAlign.Center" AllowAdding="true">
                    <Template>
                        @{
                            var elem = (context as ElementCategorie);
                            <span style="margin-right:5px;">@elem.Quantite</span>
                        }
                    </Template>
                </GridColumn>
                <GridColumn HeaderText="Commandes" Width="25%" TextAlign="TextAlign.Left" HeaderTextAlign="TextAlign.Center">
                    <HeaderTemplate>
                        <SfButton CssClass="e-success" IconCss="e-icons e-plus-icon" Content="Ajouter un élément" @onclick="@(() => { AddElement(); })"></SfButton>
                    </HeaderTemplate>
                    <Template>
                        @{
                            var elem = (context as ElementCategorie);
                            <span>
                                <SfButton CssClass="e-info" IconCss="e-icons e-plus-icon" @onclick="@( () => { AddOperation(elem); })" Content="Ajouter opération"></SfButton>
                                <SfButton CssClass="e-round e-danger e-small last-child" IconCss="e-icons e-intermediate-state-icon" @onclick="@(() => { SuppElement(elem); })"></SfButton>
                                <input type="checkbox" />
                            </span>
                         }
                        </Template>
                </GridColumn>
            </GridColumns>
</SfGrid>



Class : ElementCategorie


public class ElementCategorie : IElementLiaison
{
[PrimaryKey, Column(Name = "***")] override public int IdElementLiaison { get; set; }
[Column(Name = "***")] override public int IdxCategorie { get; set; }
[Column(Name = "***")] override public int IdxElement { get; set; }
[Column(Name = "***")] override public int ItemSuppr { get; set; }
[Column(Name = "***")] override public int CoefQualite { get; set; } = 1;
[Column(Name = "***")] override public int Quantite { get; set; } = 1;
[Column(Name = "***")] public DateTime Timestamp { get; set; } = DateTime.Now;


[Association(ThisKey = nameof(IdxElement), OtherKey = nameof(Models.Element.IdxElement))] override public Element Element { get; set; }
}



1 Reply

RS Renjith Singh Rajendran Syncfusion Team May 3, 2022 08:54 AM UTC

Hi Geraud,


Greetings from Syncfusion support.


We checked this scenario by preparing a sample using your shared codes but updating CoefQualite column works fine with the sample created from our side. We are attaching the sample which we have tried in this ticket.


Kindly refer the attached sample and check this from your side. If you are still facing difficulties, then the following details would be helpful for us to proceed further.


  1. Share a simple issue reproducing sample based on your scenario for us to validate.
  2. If possible reproduce the problem with the attached sample and share with us for further analysis.
  3. Share a video demo showing the replication of the problem you are facing.
  4. Share the exact scenario you are facing the reported problem.


The provided information will help us analyze the problem, and provide you a solution as early as possible.


Regards,

Renjith R


Attachment: ServerApp_16f24ee.zip

Loader.
Up arrow icon