877-GRID-666 24/7 online support 604, Tower A, New Trade Plaza, N.T., Hong Kong

Advanced Search with Date & Number Range Filter

Advanced search now supports range filter for both date and number. To enable search use enable_advanced_search() method with parameter set to true. Once enabled, the advanced search can be toggled with the advanced search button on the footer.

To enable range operators, use set_col_property() to set the “sorttype” to date or integer.

advanced search - number range

advanced search-date range

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$dg = new C_DataGrid("SELECT * FROM orders", "orderNumber", "orders");

$dg -> set_col_property("orderDate",
                        array("formatter"=>"date",
                            "sorttype"=>"date",
                            "searchoptions"=>
                                array("dataInit"=>"###datePick###")));

$dg -> set_col_property("customerNumber",
                        array("formatter"=>"integer",
                            "sorttype"=>"integer"));

$dg->enable_advanced_search(true);

$dg->enable_export('EXCEL');
$dg -> display();

Run demo