Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Table events > List page

Before SQL query

Scroll Prev Next More

Description

The BeforeQuery<PageName> event is executed before the SELECT SQL query is processed. Use this event if you like to modify the default SQL query, add a WHERE clause, etc.

 

Note: this event has a limited use scope. Changes made to SQL query or to WHERE clause will be only applied to data in the grid on the List page. It will not apply to filters, auto-suggest, View or Edit pages. We recommend using a more flexible technique explained in Dynamic SQL Query article instead.

Syntax

public XVar BeforeQuery<PageName>(dynamic strSQL, dynamic strWhereClause, dynamic strOrderBy, dynamic pageObject)

Arguments

strSQL

an SQL query to be executed.

strWhereClause

a WHERE clause to apply to the SQL query.

strOrderBy

an ORDER BY query to apply to the SQL query.

pageObject

an object representing the current page. For more information, see RunnerPage class.

Applies to pages

List, Print, Export, Chart.

See also:

Choose page screen

SQL query screen

About SQLQuery class

List query