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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid offline attribute issue

Thread ID:

Created:

Updated:

Platform:

Replies:

150316 Jan 1,2020 11:27 PM UTC Jan 3,2020 04:59 AM UTC Blazor 1
loading
Tags: Grid
Feifan
Asked On January 1, 2020 11:27 PM UTC

Hi Team,

After I updated my SyncFusion to 17.4.0.40, the Grid component works funny.

My code:
     <EjsGrid ModelType=@Model TValue="Report" AllowSorting="true" AllowFiltering="true" AllowPaging="true">
               <EjsDataManager Url="http://localhost:3000/reports" Adaptor="Adaptors.WebApiAdaptor" Offline="true"></EjsDataManager> 
                    <GridFilterSettings Type="Syncfusion.EJ2.Blazor.Grids.FilterType.Excel"></GridFilterSettings>
                    <GridColumns>
                        <GridColumn Field=@nameof(Report.FileName) AllowFiltering="false" HeaderText="Filename" IsPrimaryKey="true" TextAlign="TextAlign.Left" ClipMode="ClipMode.EllipsisWithTooltip"></GridColumn>
                        <GridColumn Field=@nameof(Report.ReportType) HeaderText="Report Type"></GridColumn>
                        <GridColumn Field=@nameof(Report.IssueDate) HeaderText="Date issued" Format="yyyy-MM-dd" Type="ColumnType.Date"></GridColumn>
                        <GridColumn Field=@nameof(Report.FileName) AllowFiltering="false" HeaderText="File">
                            <Template>
                                @{
                                    var report = (context as Report);
                                    {
                                        <div>
                                            <span>
                                                <a rel='nofollow' href="@report.FileLink"><i class="edge-icon fa fa-2x fa-file-pdf-o"></i></a>
                                                <a rel='nofollow' href="@report.FileLink"><i class="edge-icon fa fa-2x fa-remove"></i></a>
                                            </span>
                                        </div>
                                    }
                                }
                            </Template>
                        </GridColumn>
                    </GridColumns>
                </EjsGrid>
First, it won't work if I set the offline attribute to "true",  with a runtime error,     
Error: Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[System.Object]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.

the url http://localhost:3000/reports is just a json-server, serving the repsonse with {"Items":[{}{}{}],"Count":3}, my guess is the offline mode will direct consume the response as an array, but it is actually an object.
Another issue is that the if I remove the offline attribute, the grid is rendering upside-down,  like 



wonder if it just caused by my license expiration ?

Vignesh Natarajan [Syncfusion]
Replied On January 3, 2020 04:59 AM UTC

Hi Feifan,  

Greetings from Syncfusion support.  

Query1: “First, it won't work if I set the offline attribute to "true",  with a runtime error, 

We understand that you are facing issue in grid while using offline property of EjsDataManager. Since it is known issue we have created a defect report “DataManager offline mode is not working properly” and fixed it. Fix for the issue will be included in our upcoming Nuget release which is expected to be rolled out on or before January 14th 2020.  

You can track the status of the issue, request timeline or contact us through the below feedback  


Till then we appreciate your patience. Offline property will be used to bind the remote dataSource in local data. Since you want to bind the data as local data. You can use GetJsonAsync method of httpCient to bind the data locally.  

Query2: “Another issue is that the if I remove the offline attribute, the grid is rendering upside-down,  like  
 
The reported issue (grid header is rendered at the bottom) will occur when we refer older version of scripts with latest version Nuget. (i.e) After upgrading to latest version (17.4.0.40), we must refer the latest version script and css files (17.4.40). if there is mismatch in it. Then the reported issue will occur.  

Kindly ensure that you have referred the same and latest version of Nuget (17.4.0.40) and script files (17.4.40) like below  

<link rel='nofollow' href="https://cdn.syncfusion.com/ej2/17.4.40/material.css" rel="stylesheet" /> 


Refer our UG documentation to upgrade the application to latest version.  


Query3: “wonder if it just caused by my license expiration ? 
 
No. It is not related to licensing query. If you are facing the licensing  issue even if you have valid license kindly refer the below Knowledge base document for your reference 


Please get back to us if you have further queries.     

Regards 
Vignesh Natarajan. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon