EasyUI Forum
September 16, 2025, 07:57:54 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Read JSON data  (Read 20647 times)
ClSoft
Jr. Member
**
Posts: 92


View Profile
« on: April 12, 2013, 01:31:03 AM »

Hi all
I have treegrid with about 400 records. I can not use pagination.
Preparing of JSON file take about 1 sec, but displaying of data take about 20 seconds.
Each record have about 10 columns.
I'm using i5 processor with 8 GB of RAM.
Is that OK or it should display data faster?
Thanks.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: April 12, 2013, 03:10:21 AM »

How do you define the treegrid component? Providing a simple example may be appropriate.
Logged
ClSoft
Jr. Member
**
Posts: 92


View Profile
« Reply #2 on: April 12, 2013, 03:29:48 AM »

Hello
here is declaration of treegrid:
Code:
  <table id="members_tree" class="easyui-treegrid" toolbar="#tb" fit="true" fitcolumns="true" rownumbers="true" url="json/members_tree.json" idField="select_id" treeField="firstlastname" 
    data-options="onClickRow:onClickMemberTreeRow,onLoadSuccess:onLoadSuccessMembers">
<thead>
<tr>
  <th field="select_id" hidden="true"></th>
  <th field="id" hidden="true"></th>
  <th field="firstlastname" width="600%">First and Last name</th>   
  <th field="email" width="100%">Email</th>     
  <th field="phone" width="100%">Phone</th>   
  <!--  <th field="cell" width="100%">Cell phone</th>   -->
  <th field="entrydate" width="100%">Entry date</th>   
  <th field="birthdate" width="100%">Date Of Birth</th>   
  <th field="note" width="100%">Note</th>   
</tr>
</thead>
  </table>

Thank you!
Logged
ClSoft
Jr. Member
**
Posts: 92


View Profile
« Reply #3 on: April 12, 2013, 04:33:58 AM »

Here is complete example but without /scripts/jquery.easyui.min.js (because of 128 KB size limit).
Thanks.
Logged
ClSoft
Jr. Member
**
Posts: 92


View Profile
« Reply #4 on: April 12, 2013, 06:35:38 AM »

Update:
attached is new tree.htm (old have wrong table declaration, but loading time is same)
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #5 on: April 12, 2013, 07:42:43 AM »

Please try to use the treegrid definition below. It runs quickly in chrome,firefox and ie.
Code:
    <table title="Folder Browser" class="easyui-treegrid" fit="true" fitcolumns="true"  
            data-options=" 
                url: 'members_tree.json', 
                idField: 'id', 
                treeField: 'firstlastname' 
            "> 
        <thead> 
          <tr>
            <th field="firstlastname" width="600%">First and Last name</th>   
            <th field="email" width="100%">Email</th>     
            <th field="phone" width="100%">Phone</th>   
            <th field="entrydate" width="100%">Entry date</th>   
            <th field="birthdate" width="100%">Date Of Birth</th>   
            <th field="note" width="100%">Note</th>   
          </tr>
        </thead> 
    </table> 
Logged
ClSoft
Jr. Member
**
Posts: 92


View Profile
« Reply #6 on: April 12, 2013, 08:41:22 AM »

It works light fast!
Thanks man.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!