EasyUI Forum
September 14, 2025, 03:58:53 AM *
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 combobox with many rows  (Read 13135 times)
Stefan B.
Full Member
***
Posts: 152


Software Architekt


View Profile Email
« on: March 23, 2015, 02:52:40 AM »

We use combobox to show a list of many entrys (17.000)
When click on the combobox arrow it takes 3-5 Seconds to show the list. Also every time, when klick to show the list, its takes the same time to show the list.

Questions:
1) Is there a solution to do the rendering faster?
2) Or is there a way to add first 100 entrys to the list, show the list and then add the rest of the data?


Here is my exsample: http://jsfiddle.net/5kh84uo4/2/
Test with Chrome: Performance sometimes OK
Test with Firefox: Very slow and have problems with script runtimes
Test with IE: Very slow
« Last Edit: March 23, 2015, 03:31:33 AM by Stefan B. » Logged
jarry
Administrator
Hero Member
*****
Posts: 2298


View Profile Email
« Reply #1 on: March 24, 2015, 12:31:13 AM »

There is no virtual scrolling feature in the combobox component. You can try to use the combogrid with virtual scroll view to populate your data rows.
Logged
Stefan B.
Full Member
***
Posts: 152


Software Architekt


View Profile Email
« Reply #2 on: March 24, 2015, 01:56:59 AM »

I test the combogrid with virtual scroll view to show the data.
It works fine with the virtual scroll view.

1) But now i cannot find a exsample how to filter the rows, when the mode is set to 'local'.
* That means we load the complete datasets 20.000 and the combogrid with the virtual scoll shows only 50 Datasets.
* Now we typ a name in the combobox and now, how can we filter the comlete data to show only the values start with the text?

2) How can I use the combogrid as editor on datagrid?
« Last Edit: March 24, 2015, 04:02:22 AM by Stefan B. » Logged
thecyberzone
Full Member
***
Posts: 176



View Profile Email
« Reply #3 on: March 24, 2015, 08:47:22 AM »

If you want to render a Combogrid with 1000+ rows, I can suggest you just do the following :
1. Put the mode as 'remote' not 'local'
2. Now get the remote JSON formatted data by filtering the selection based on your keypressed character as follows:

Code:
<?php
include 'dbconfig.php';

[
color=red]$q = isset($_POST['q']) ? strval($_POST['q']) : '';

$sql "select * from section where section like '%$q%' ORDER BY deptcode, secode2";[/color]

$rs mysql_query($sql) or die('not found!');
if (
$rs){
$items = array();
while($row mysql_fetch_object($rs)){
array_push($items$row);
}
$result["rows"] = $items;
echo json_encode($result);
} else {
echo json_encode(array('msg'=>'No section allocated with this user!'));
}
?>

See the red colored code for filtering remote rows.

And if you want to use ComboGrid as datagrid cell editor, this is same as you do in case of combobox, nothing special, same way you can define the editor as ComboGrid.
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!