DataGrid Delete: Newtonsoft.Json error, when a row value contains quotation mark

Hi,

I get this error message, when I try to delete from SfGrid with the CommandColumn (when a row  contains " mark).

Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: d. Path 'data.0.eTag', line 1, position 136.

Environment:

Platform: Syncfusion Blazor Webassembly (client side)
Version: 18.1.0.53
To reproduce: Run the sample (below) and click on the delete button
Current result: Row not deleted, the console shows the error message with stack trace
Expected result: The row deleted without errors
Workaround: It works, when I delete the row with a 
CommandButtonType.None Column and my custom handler code

Example code to reproduce:

@page '/'

@using Syncfusion.Blazor.Grids

    <SfGrid DataSource="@list">
        <GridEditSettings Mode="EditMode.Dialog" AllowAdding="true" AllowDeleting="true" AllowEditing="false" />
        <GridColumns>
            <GridColumn HeaderText="Id" Field=@nameof(EmployeeData.Id) IsPrimaryKey="true" />
            <GridColumn HeaderText="FirstName" Field=@nameof(EmployeeData.FirstName) />
            <GridColumn>
                <GridCommandColumns>
                    <GridCommandColumn Type="CommandButtonType.Delete"
                                       Title="Delete"
                                       ButtonOption="@(new CommandButtonOptions() { CssClass="e-flat",
Content="Delete" })" />
                </GridCommandColumns>
            </GridColumn>
        </GridColumns>
    </SfGrid>

@code {
    public class EmployeeData
    {
        public int Id { get; set; }
        public string FirstName { get; set; }
        public string Designation { get; set; }
        public string eTag { get; set; }
    }

    public List<EmployeeData> list = new List<EmployeeData>()
    {
        new EmployeeData{ Id=1, FirstName="Adam", Designation="None", eTag="W/\"datetime'2020-05-31T18:53:18.21Z'\"" },
        new EmployeeData{ Id=2, FirstName="Andy", Designation="None", eTag="W/\"datetime'2020-05-31T18:55:18.21Z'\"" },
    };
}

Thank you!

Regards,
 Peter

2 Replies 1 reply marked as answer

PN Péter N June 3, 2020 06:36 AM UTC

Hi,

I updated to 18.1.0.55 and now it works fine.

Regards,
 Peter


RS Renjith Singh Rajendran Syncfusion Team June 3, 2020 10:02 AM UTC

Hi Németh, 

Greetings from Syncfusion support. 

We are glad to hear that your problem has been resolved after upgrading to 18.1.0.55. Please find the release notes for the version from the link below, 

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran 


Marked as answer
Loader.
Up arrow icon