EasyUI Forum
September 13, 2025, 12:10:27 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: Slow rendering of treegrid  (Read 14791 times)
msvabik
Newbie
*
Posts: 30


View Profile
« on: March 28, 2013, 02:11:13 AM »

Hello
I have a problem with rendering treegrid table that contains about 500 lines. Data is retrieved using JSON in 411ms and then takes 1 minute rendering the table. These times apply to firefox. In Internet Explorer, it's even longer.

Here is the html table code
Code:
<table id="tt" title="{title_table}" class="easyui-treegrid" style="width:auto;height:610px" url="json.php?pob={pobocka}"  
        rownumbers="false" showFooter="false" autoRowHeight="false"
        idField="id" treeField="name">
<thead>
<tr>
<th colspan="7">Součet za:</th>
<th colspan="7">Zákazník</th>
<th colspan="6">Pobočka</th>
<th colspan="6">Firma</th>
</tr>
<tr>
<th colspan="7">Popis/Rok</th>
<th colspan="2">2011</th>
<th colspan="2">2012</th>
<th colspan="3">2013</th>
<th colspan="2">2011</th>
<th colspan="2">2012</th>
<th colspan="2">2013</th>
<th colspan="2">2011</th>
<th colspan="2">2012</th>
<th colspan="2">2013</th>
</tr>
<tr>
<th field="name" width="300px">Název</th>
<th field="match">Match</th>
<th field="norm" align="right">NORM</th>
<th field="TOP" align="right">TOP</th>
<th field="BUS" align="right">BUS</th>
<th field="VIP" align="right">VIP</th>
<th field="PER" align="right">PER</th>
<th field="M2011" align="right" styler="zakaznik">ks</th>
<th field="P2011" align="right" styler="zakaznik" formatter="cislo">Prodej</th>
<th field="M2012" align="right" styler="zakaznik">ks</th>
<th field="P2012" align="right" styler="zakaznik" formatter="cislo">Prodej</th>
<th field="M2013" align="right" styler="zakaznik">ks</th>
<th field="P2013" align="right" styler="zakaznik" formatter="cislo">Prodej</th>
<th field="PL2013" align="right" styler="plan" formatter="cislo">Plán</th>
<th field="MM2011" align="right" styler="pobocka">ks</th>
<th field="PP2011" align="right" styler="pobocka" formatter="cislo">Prodej</th>
<th field="MM2012" align="right" styler="pobocka">ks</th>
<th field="PP2012" align="right" styler="pobocka" formatter="cislo">Prodej</th>
<th field="MM2013" align="right" styler="pobocka">ks</th>
<th field="PP2013" align="right" styler="pobocka" formatter="cislo">Prodej</th>
<th field="MF2011" align="right" styler="firma">ks</th>
<th field="F2011" align="right" styler="firma" formatter="cislo">Prodej</th>
<th field="MF2012" align="right" styler="firma">ks</th>
<th field="F2012" align="right" styler="firma" formatter="cislo">Prodej</th>
<th field="MF2013" align="right" styler="firma">ks</th>
<th field="F2013" align="right" styler="firma" formatter="cislo">Prodej</th>
</tr>
</thead>   
</table>

Here is the javascript code
Code:
easyloader.locale='cs';
function cislo(value,row,index)
{
if(typeof value !='undefined') return number_format(parseFloat(value.replace(",",".")),0,',',' ');
else return "";
}
function zakaznik(value,row,index){ 
    return 'background-color:#ffffbb'; 

function plan(value,row,index){
if(typeof value !='undefined')
{
if(parseFloat(value.replace(",",".")) > parseFloat(row.P2013.replace(",",".")))
    return 'background-color:#ffffbb;color:red;';
    else 
    return 'background-color:#ffffbb;color:green;';
    }
    else 
    return 'background-color:#ffffbb;color:green;';

function pobocka(value,row,index){ 
return 'background-color:#ccffcc'; 

function firma(value,row,index){ 
return 'background-color:#ffeebb'; 
}

If I don't use formatting of column and numbers  it does not have significant impact to rendering time.

Thanks a lot.
Logged
msvabik
Newbie
*
Posts: 30


View Profile
« Reply #1 on: March 28, 2013, 06:26:30 AM »

Ok, sorry, my mistake. You must specify the column width fixed. Then everything goes fast.
Logged
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« Reply #2 on: September 02, 2014, 02:59:03 AM »

LOL ..
Same problem here...

weird solution..but it works Cheesy
Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« Reply #3 on: September 02, 2014, 03:05:26 AM »

Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
wexwell
Newbie
*
Posts: 8


View Profile Email
« Reply #4 on: September 02, 2014, 12:39:53 PM »

good to know, I have been having slow rendering in IE but have not tackled that yet...  I guess now I know the solution Grin.
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!