The action a user can assign to a button control.
Button controls
Describe and Modify argument:
"buttonname.Action { = ' value ' }"
Parameter |
Description |
---|---|
buttonname |
The name of the button for which you want to assign an action. |
value |
The action value assigned to the button. Values are listed in the following table. |
Value |
Action |
Description |
Value returned to ButtonClicked event |
---|---|---|---|
0 |
UserDefined |
(Default) Allows for programming of the ButtonClicked and ButtonClicking events with no intervening action occurring. |
Return code from the user’s coded event script. |
1 |
Retrieve (Yield) |
Retrieves rows from the database. Before retrieval actually occurs, option to yield is turned on. This allows the Cancel action to take effect during a long retrieve. |
Number of rows retrieved. |
2 |
Retrieve |
Retrieves rows from the database. The option to yield is not automatically turned on. |
Number of rows retrieved. |
3 |
Cancel |
Cancels a retrieval that has been started with the option to yield. |
0 |
4 |
PageNext |
Scrolls to the next page. |
The row displayed at the top of the DataWindow control when the scrolling is complete or attempts to go past the first row. -1 if an error occurs. |
5 |
PagePrior |
Scrolls to the prior page. |
The row displayed at the top of the DataWindow control when the scrolling is complete or attempts to go past the first row. -1 if an error occurs. |
6 |
PageFirst |
Scrolls to the first page. |
1 if successful. -1 if an error occurs. |
7 |
PageLast |
Scrolls to the last page. |
The row displayed at the top of the DataWindow control when the scrolling is complete or attempts to go past the first row. -1 if an error occurs. |
8 |
Sort |
Displays Sort dialog box and sorts as specified. |
1 if successful. -1 if an error occurs. |
9 |
Filter |
Displays Filter dialog box and filters as specified. |
Number of rows filtered. Number < 0 if an error occurs. |
10 |
DeleteRow |
If button is in detail band, deletes row associated with button; otherwise, deletes the current row. |
1 if successful. -1 if an error occurs. |
11 |
AppendRow |
Inserts row at the end. |
Row number of newly inserted row. |
12 |
InsertRow |
If button is in detail band, inserts row using row number associated with the button; otherwise, inserts row using the current row. |
Row number of newly inserted row. |
13 |
Update |
Saves changes to the database. If the update is successful, a COMMIT is issued. If the update fails, a ROLLBACK is issued |
1 if successful. -1 if an error occurs. |
14 |
SaveRowsAs |
Displays Save As dialog box and saves rows in the format specified. |
Number of rows filtered. |
15 |
Prints one copy of the DataWindow object. |
0 |
|
16 |
Preview |
Toggles between preview and print preview. |
0 |
17 |
PreviewWithRulers |
Toggles between rulers on and off. |
0 |
18 |
QueryMode |
Toggles between query mode on and off. |
0 |
19 |
QuerySort |
Specifies sorting criteria (forces query mode on). |
0 |
20 |
QueryClear |
Removes the WHERE clause from a query (if one was defined). |
0 |
Select the control and set the value in the Properties window, General category.
[Visual Basic] Dim ActionValue as String dw1.SetProperty("RetrieveButton.Action", "2") ActionValue = dw1.Describe("RetrieveButton.Action") dw1.Modify("RetrieveButton.Action = '2'")
[C#] string ActionValue; dw1.SetProperty("RetrieveButton.Action", "2" ActionValue = dw1.Describe("RetrieveButton.Action") dw1.Modify("RetrieveButton.Action = '2'")