You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can configure the settings of the grid with the parameters and methods of the GridServer objects. Remember that the GridClient object in the front-end client project and the GridServer object on the server project must have compatible settings.
GridServer parameters
Parameter
Description
Example
entityManager
EntityManager object to create queries to the database
em
targetType
class of the object to be listed on the grid
Order.class
query
map containing all grid parameters
Must be the HttpServletRequest.getParameterMap() of the action controller
columns
lambda expression to define the columns included in the grid (Optional)
Columns lambda expression defined in the controller of the example
pageSize
integer to define the number of rows returned by the web service (Optional)
10
GridServer methods
Method name
Description
Example
autoGenerateColumns
Generates columns for all properties of the model using data annotations
GridServer(...).autoGenerateColumns();
sortable
Enable or disable sorting for all columns of the grid
GridServer(...).sortable(true);
searchable
Enable or disable searching on the grid
GridServer(...).searchable(true, true);
filterable
Enable or disable filtering for all columns of the grid
GridServer(...).filterable(true);
withPaging
Enable paging and setting the number of items to be shown
GridServer(...).withPaging(10);
setColumns
lambda expression to define the columns included in the grid