Filtering with Big Datasets ?


i have a grid with more than 50.000 data rows and 16 columns. Script “50,000 records in grid with paging” now works really fine for me. The only problem is that “attachheader” doesn’t work. Is there a way to get this working ?

Thank you in advance.

Best regards


Can you provide a snippet which you are using for header attaching?
Be sure to place code before grid.init ( if it placed after grid.init you may need to call grid.setSizes() to make it visible )


I can see the attached header but i can’t see or filter data !
Here is a live preview:

Thank you

text_filter with connector_text_filter
select_filter with connector_select_filter

You are using dynamic loading, which limits filtering to server side filtering only.

Connector? I thought i’m using XML structure? Or is it the same? I included the “.js” and changed the type but data is still wrong (–> link above) :cry:

When you are using dynamic loading, the client side filtering can’t be applied as it requires full data for filtering.

You can use server side sorting, for that you need to clear existing grid and reload the data from server in new order.

If you are using connector for data generation on server side you can just use connector filters - which do it automatically. If you are using custom code for data ( xml ) generation - you need to implement that code on your own ( original 50000 rows sample has such code at server side )

Hello Stanislav

I really don’t understand how i can realize that?!
In the example you’ve created search input fields by your own?!

Can you give me some exactly facts what i have to do :frowning: ?

Thank you and best regards

I really don’t understand how i can realize that?!
If you are using connectors - you need just change filter name in one place to enable server side filtering, so it is quite simple.

If you are using custom server side, the situation is really more complex.
While it possible to implement fully custom solution, the next steps show the mixed one, which is not so complex

a) include connector.js on the page ( after other dhtmlx js files )
b) use in grid #connector_text_filter instead of the text filter
c) now you need to adjust server side logic, code which requests data from database need to check if $_GET[“dhx_filter”] is set. If this var is set it contains a hash of search request

$filter = $_GET["dhx_filter"]; foreach ($filter as $key => $value) $sql.=" AND ".$key." LIKE '%".$value."' "; //this is a naive implementation, just an example