Conditions property

Official Content
This documentation is valid for:
To define filter(s) to be taken into account when navigating records that will be loaded on the grid control.

Description

A condition is a logical expression (its evaluation is True or False), that may include attributes, constant values, variables, functions, and other expressions. Attributes must belong to the extended table of the base table where the condition is applied.

For adding new conditions criteria you must:

  1. Click on select icon which displays the editing conditions prompt.
  2. Write the condition(s) you want to apply for filtering item in the grid (e.g. "NeighborhoodId = 1;").
  3. Click on "Ok" button and check that the condition value is displayed on the property's value.

To remove conditions there are two options:

  1. Right-click on Condition property field and select "Use default" option. This action will clean every condition wrote.
  2. Click on select icon and erase the desired condition from the prompt.

Note:
Condition property applies for the individual grid control for which was defined. It cannot be confused with Condition tab on the GeneXus object which aim is applying filters to the whole object (form, all the grids, etc.).

Run-time/Design-time

This property applies only at design-time.

Samples

Having the grid defined below, the condition will filter those Properties where belongs to the neighborhood with Id = 1.

ConditionDesignTime_edit_png

In the example above, without the filter, we have all records in our system; but after applying the condition criteria, we only have two.

ConditionRunTime_both_edit_png

This example is available on RealEstate.

Scope

Platforms: Web(.Net, Java), Smart Devices(Android, IOS)
Controls: FreeStyle Grid, Grid

See Also