We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Grid not showing data

Hi, Ive been working with the grid component since the last couple of months and all was going ok until today.
The Grid component doesnt displays any data and the dropdown neither.

<EjsGrid AllowPaging="true" DataSource="@Suppliers">
            <GridPageSettings PageSize="5"></GridPageSettings>
            
            <GridColumns>
                <GridColumn Field="@nameof(SIJ.ShortName)" HeaderText="Nombre Corto"></GridColumn>
                <GridColumn Field="SupplierType.Description" HeaderText="Tipo"></GridColumn>
                <GridColumn HeaderText="Acciones" Width="150">
                    <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>
                        @*<GridCommandColumn Type="CommandButtonType.Save" ButtonOption="@(new CommandButtonOptions() { IconCss = "e-icons e-update", CssClass = "e-flat" })"></GridCommandColumn>
                <GridCommandColumn Type="CommandButtonType.Cancel" ButtonOption="@(new CommandButtonOptions() { IconCss = "e-icons e-cancel-icon", CssClass = "e-flat" })"></GridCommandColumn>*@
                    </GridCommandColumns>
                </GridColumn>
            </GridColumns>
        </EjsGrid>


@code {
    public ICollection<TanCoLogisticsSDK.Supplier> Suppliers { get; set; }
    protected override async Task OnInitializedAsync()
    {
        Suppliers = await SCIJ.GetSuppliersAsync();
    }
}



1 Reply

VN Vignesh Natarajan Syncfusion Team September 27, 2019 08:56 AM UTC

Hi Raul,  

Greetings from Syncfusion support.  

Query: “Ive been working with the grid component since the last couple of months and all was going ok until today. && The Grid component doesnt displays any data and the dropdown neither” 

To replicate the reported issue we have prepared a sample to bind the data asynchronously with complex data. But we are unable to reproduce the reported issue at our end. Kindly download the sample from below link which we have prepared using our latest version Nuget package (17.3.0.10-beta).  


By seeing your screenshot, we suspect that you are facing Camel Case issue in Asp.Net Core. Normally, ASP.NET Core 1.0+ framework has camel casing issues while serializing the JSON Object. If you are facing the same camel casing issue while running the sample then please use the below codes in Startup.cs file to overcome that casing issue in Application level.  
 
In the below code, we have called the ContractResolver options under the Startup.cs file to avoid camel casing conversion during the serialization process. The is related to ASP.NET Core specifics and we suggest refer to the following article which describes how to overcome a similar issues. 
 
 
Please use the code below, 

[Startup.cs] 
 
        public void ConfigureServices(IServiceCollection services) 
        { 
 
            services.AddMvc().AddNewtonsoftJson(options => { 
                options.SerializerSettings.ContractResolver = new DefaultContractResolver(); 
            }); 
       } 

 
Note: In your sample, you have use CommandColumn, but did not define the GridEditSettings. You need define GridEditSettings to perform CRUD action in Grid. Refer our UG documentation for your reference 


After referring the sample, if you are still facing the issue kindly get back to us with following details.  

  1. Are you facing the reported issue after upgrading the Syncfusion Nuget package or .NetCore version?.
  2. You have mentioned that you are facing issue in dropdown list also. But we could not find code example related to it. Kindly share more details on this.
  3. Share your Blazor Application type (Server or Client) along with Syncfusion Nuget package version. Also ensure that you have referred same version of script files and Nuget package
  4. If possible try to reproduce the reported issue in provided sample.

Requested details will be helpful for us to validate the reported issue at our end and provide the solution as soon as possible.   

Regards, 
Vignesh Natarajan. 


Loader.
Live Chat Icon For mobile
Up arrow icon