Web Grids based on Stored Procedures

Description

A guide to creating updateable Grids that are based on stored procedures.

It is now possible to base a Grid on a stored procedure. Previously, the only way to base a Grid on a stored procedure was to create a Passive-link table and then base the Grid on the Passive-Link table. This work-around was only helpful if your Grid was read-only. Now, you no longer need to go through the intermediate step of creating the Passive-Link table, which means that you can create updateable Grids that are based on stored procedures. For details on how to base a Grid on a stored procedure, see the article on the following new server-side Grid events:

  • onSQLCountQuery

  • onSQLSelectQuery

  • onSQLSummaryValuesQuery

  • onSQLRefreshRowQuery

In order to base a Grid on a stored procedure, you will need to define event handlers for the onSQLCountQuery and the onSQLSelectQuery events. If your Grid displays summary values, you will need to define event handlers for the onSQLSummaryValuesQuery event. Finally, if your Grid is updateable, or if it is not updateable but you use the Grid's .refreshRow() method, you will need to define the event handler for onSQLRefreshRowQuery.

See Also