Sometimes you need the datagrid to be able to remember sort order and current page. For that, it requires only a single function call to “enable_persist_state()” function to enable this feature. It stores current page, sort name, sort order, and even filter information in the HTML5 “localStorge” automatically. This is different from Cookie or Session because the data stored in localStorage has no expiration time.
When you need to clear what’s int the localStorage for the current datagrid, click the “refresh” icon in the footer.
Note it does not support subgrid.
$dg = new C_DataGrid("SELECT * FROM orders", "orderNumber", "orders");