Applying web behaviors to web controls in the panel
You can apply some web behaviors, including Filter, Sort and Change Property, to the web controls you insert in the configuration panel of a library component so as to filter or sort the records in the table, chart or crosstab of the library component or change the properties of an object in the library component at runtime.
Filter
The Filter web behavior enables you to filter the records in a table, chart or crosstab.
To bind the Filter web behavior to a web control:
- Right-click the web control, and then select Web Behaviors > Filter from the shortcut menu. The Filter - Web Behavior dialog appears. See the dialog.
- From the Apply Action To drop-down list, select the data component the records of which you want to filter.
- In the Filter On column, specify the field on which to filter the records. The field may be a column in the component, or be specified by the value of a web control.
- Specify the operator and value. The value may be input by yourself, or be the value of a web control.
- Click OK to accept the settings.
Then at runtime, when end users specify a value for the web control and click OK in the configuration panel, the records in the data component will be filtered.
Sort
The Sort web behavior enables you to sort the records in a table, chart or crosstab.
To bind the Sort web behavior to a web control:
- Right-click the web control, and then select Web Behaviors > Sort from the shortcut menu. The Sort - Web Behavior dialog appears. See the dialog.
- From the Apply Action To drop-down list, select the data component the records of which you want to sort.
- In the Sort On column, specify the field on which to sort the records. The field may be a column in the component, or be specified by the value of a web control.
- Specify the sort value. The value may be Ascending or Descending, or be the value of a web control.
- If necessary, click to add a new sort condition.
To delete a sort condition, click . To adjust the order of the sort conditions, click or .
- Click OK to accept the settings.
Then at runtime, when end users specify a value for the web control and click OK in the configuration panel, the records in the data component will be sorted.
Change Property
The Change Property web behavior enables you to change properties of an object in the library component.
To bind the Change Property web behavior to a web control:
- Right-click the web control, and then select Web Behaviors > Change Property from the shortcut menu. The Change Property - Web Behavior dialog appears. See the dialog.
- From the Apply Action To drop-down list, select the object the properties of which you want to change.
- In the Properties column, specify the property you want to change. All the properties of the object you select from the Apply Action To drop-down list are listed here.
- In the Value column, specify the value of the property. The value may be input by yourself, or be specified by the value of a web control.
- If necessary, click to add a new line to change a property.
To delete a property line, click . To adjust the order of the properties, click or .
- Click OK to accept the settings.
Then at runtime, when end users specify a value for the web control and click OK in the configuration panel, the properties of the specified object in the library component will be changed.