How to load data table with server function
This tutorial shows you how to use Server function as Data source type in data table component. In our example we have page for products, and on first form of that page we will show data table of all products.
1. Login into developer panel.
2. Navigate to Pages menu item.
3. Select page pageProduct.
4. Drag and drop Data table component from all components list to formDatatableProduct.
5. Click on Data source Function field and on the left side of dialog window choose plugin. On the right side choose function. Selected function should return AjaxProxy class which attribute data should be an array with data and rowNum keys (i.e. $result->data[“data”]= array(array(“Id” =>”1″, “Name” => “Product 1”)); $result->data[“rowNum”] = 1;) or just an array with data and rowNum keys. Click on Save button.
6. Click on Save changes, go into your application and check out the results.