Add new row doesn't work with Blazor DataGrid using odata (ver. 18.2.0.46)

Hello Everyone,
I tried to use DataGrid with OData service but Add button doesn't work for me and I don't see any error, just nothing happens.



@page "/countries"
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication
@using Company.Domain.Data
@using Company.Domain.Dictionaries
@attribute [Authorize]
@inject HttpClient Http

<h1>Countries</h1>

<p>Countries.</p>

@using Syncfusion.Blazor
@using Syncfusion.Blazor.Grids
@using Syncfusion.Blazor.DropDowns
@using Syncfusion.Blazor.Data

<SfGrid TValue="Country" EnableHover="true" AllowPaging="true" Toolbar="@(new List<string>() { " Add", "Edit" , "Delete" , "Cancel" , "Update" })">
    <GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="EditMode.Normal"></GridEditSettings>
    <SfDataManager Url="/odata/countries" Adaptor="Adaptors.ODataV4Adaptor"></SfDataManager>
    <GridColumns>
        <GridColumn Field=@nameof(Country.RecId) HeaderText="Id" IsPrimaryKey="true" IsIdentity="true" Visible="false"></GridColumn>
        <GridColumn Field=@nameof(Country.Name) HeaderText="Name"></GridColumn>
        <GridColumn Field=@nameof(Country.EnglishName) HeaderText="English Name"></GridColumn>
        <GridColumn Field=@nameof(Country.Code) HeaderText="Code"></GridColumn>
    </GridColumns>
</SfGrid>

Any idea what might have gone wrong here?




2 Replies 1 reply marked as answer

SH Shadowchamber August 3, 2020 10:13 PM UTC

I found myself. It is because of space character in button Add of the toolbar.

Marked as answer

RN Rahul Narayanasamy Syncfusion Team August 4, 2020 09:23 AM UTC

Hi Shadowchamber, 
 
Greetings from Syncfusion. 
 
We are happy to hear that you have solved the reported problem by yourself. Please get back to us if you need further assistance. 
 
Regards, 
Rahul 


Loader.
Up arrow icon