EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: rezzonico on January 23, 2019, 06:21:24 AM



Title: datagrid + formatter
Post by: rezzonico on January 23, 2019, 06:21:24 AM
Hi all,

I have a datagrid and a formatter function (in order to display the "description" instead of the "id").
The formatter function starts an ajax request that do a "SELECT".
All is ok.

The problem
--------------
I some case I need to display 5000 lines.
In this case the formatter function is called 5000 times (this is too much !!).

Question
----------
How to solve this ?
Is it possible to return in the json string the "id" and also the "formatter-code".


Thanks
Miche


Title: Re: datagrid + formatter
Post by: stworthy on January 23, 2019, 11:36:26 PM
If possible, please return the 'id' with the formatted 'description' in your server side to avoid the calculating times in client side. You can also apply the scrollview to display large dataset page by page.


Title: Re: datagrid + formatter
Post by: rezzonico on January 24, 2019, 01:57:43 AM
Thanks a lot !

Miche