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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

grid.getPersistData() fails when there is a pagerTemplate

Thread ID:

Created:

Updated:

Platform:

Replies:

142523 Feb 7,2019 03:26 PM UTC Mar 14,2019 05:10 AM UTC Angular - EJ 2 4
loading
Tags: Grid
Vicent Ortega
Asked On February 7, 2019 03:26 PM UTC

Hello,

     the grid is working fine until I set a template for the pager. Then I get the following error when I try to call grid.getPersistData() on the dataStateChange event handler:

UsuariosComponent.html:9 ERROR TypeError: Converting circular structure to JSON at JSON.stringify (<anonymous>) at GridComponent.push../node_modules/@syncfusion/ej2-base/src/component.js.Component.addOnPersist (component.js:271) at GridComponent.push../node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js.Grid.getPersistData (grid.js:374) at UsuariosComponent.push../src/app/usuarios/usuarios.component.ts.UsuariosComponent.dataStateChange (usuarios.component.ts:66) at Object.eval [as handleEvent] (UsuariosComponent.html:16) at handleEvent (core.js:23008) at callWithDebugContext (core.js:24078) at Object.debugHandleEvent [as handleEvent] (core.js:23805) at dispatchEvent (core.js:20457) at core.js:21947

The grid is set this way:

<ejs-grid id="gridUsuarios" enablePersistence="true" isResponsive="true" height="100%" [dataSource]="dtoUsuarios$ | async" allowSorting="true" allowPaging="true" (dataStateChange)="dataStateChange($event)" (beforeDataBound)='beforeDataBound($event)'> <e-columns> <e-column field='Alias' headerText='Alias'></e-column> <e-column field='Nombre' headerText='Nombre'></e-column> <e-column field='MomentoUltimoLogin' headerText='Último login'></e-column> <!--<e-column field='MomentoUltimoLogin' headerText='Último login' [format]="{ type: 'dateTime', format: 'yyyy/MM/dd hh:mm' }"></e-column>--> </e-columns> <ng-template #pagerTemplate let-datosPag> <div style="display:block; height:45px; background-color:lightblue;"> <div> <div><b>{{datosPag.currentPage}} of {{datosPag.totalPages}}</b></div> <div>{{datosPag.totalRecordsCount}} items</div> </div> </div> </ng-template> </ejs-grid>

And everything works again if I remove the #pagerTemplate.

Is this a bug on the current version (EJ2 v16.4.52) or am I doing something wrong?

Thanks in advance


Thavasianand Sankaranarayanan [Syncfusion]
Replied On February 8, 2019 08:56 AM UTC

Hi Vicent, 

Greetings from Syncfusion. 

We have validated the provided information and checked with our end. We are able to reproduce the reported problem so we confirmed “Need to exclude template from pageSettings while get persist data in Grid” as a defect and logged a report for the same. We will include the defect fix in our February 27, 2019 patch release. 

You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link. 
 
Regards, 
Thavasianand S. 


Thavasianand Sankaranarayanan [Syncfusion]
Replied On February 28, 2019 12:35 PM UTC

Hi Vicent, 
 
Sorry for the inconvenience caused. 
  
Due to some complexity facing we are unable to include the fix in the February 27th Patch release. The fix for the issue “Need to exclude template from pageSettings while get persist data in Grid” and it will be included in our next patch release on March 6th , 2019.   
  
Until then we appreciate your patience.  
 
Regards, 
Thavasianand S. 


Thavasianand Sankaranarayanan [Syncfusion]
Replied On March 7, 2019 11:53 AM UTC

Hi Vicent, 
 
We are really sorry for the inconvenience caused. 
  
When we fixing this we are facing some other functionality issue due to this complexity we are unable to include this in March 6th, 2019 patch release. So, we will include this fix for the issue “Need to exclude template from pageSettings while get persist data in Grid” in our Essential Studio Volume 1 beta release which rolled in next week of March, 2019. 
  
Until then we appreciate your patience.  
 
Regards, 
Thavasianand S. 


Thavasianand Sankaranarayanan [Syncfusion]
Replied On March 14, 2019 05:10 AM UTC

Hi Vicent, 
Thanks for your patience. 
We are glad to announce that our Essential JavaScript 2 Volume 1 beta release (17.1.32) has been rolled out successfully and in that release, we have added the fix for the issue Need to exclude template from pageSettings while get persist data in Grid. 
 
Regards, 
Thavasianand S. 


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

;