DHTMLX Docs & Samples Explorer
Table of Contents

URL manipulation

You can control which data loaded in component by specifying additional parameters in URL. Check protocol details for full url parameters description.

Filtering

  • Filter by one field
       grid.load("some.php?connector=true&dhx_filter[1]=mask");

With such url - data will be taken with additional rule

       WHERE field_for_column_1 LIKE %mask%
  • Filter by multiple fields
       grid.load("some.php?connector=true&dhx_filter[1]=mask&dhx_filter[3]=another");

Similar approach can be used against other component, but you will need to provide exact field name instead of column index.

Beware that such filtering is not-secure, if you need to hide some data - be sure to define such limitation on server side, not as part of URL

Sorting

       //ORDER by field_2 ASC
       grid.load("some.php?connector=true&dhx_sort[2]=asc");
       //ORDER by field_2 ASC, field_3 DESC
       grid.load("some.php?connector=true&dhx_sort[2]=asc&dhx_sort[3]=desc");