Task method on Form
Suppose you have a form with a grid control which displays some record.
Now through code, you want to move ahead or back in the grid, similar to like moving to next record or previous record. That can be done using the task method on the form.
The task method takes an int argument that defines the task to be performed. For moving to the next record, the task id is 2817 and moving to the previous record the task id is 2818.
Insert a button, name it Next and put the following code in the clicked method
So when you click this button, the cursor will move to the next record in the grid. Some of the other tasks and their ids are given below.
Tasks Task Ids
=======================
New 260
Save 272
Print 278
PrintPreview 299
Cut 770
Copy 771
Paste 772
Find 779
NextRecord 2817
PreviousRecord 2818
FirstRecord 2823
LastRecord 2824
Delete 2832
Now through code, you want to move ahead or back in the grid, similar to like moving to next record or previous record. That can be done using the task method on the form.
The task method takes an int argument that defines the task to be performed. For moving to the next record, the task id is 2817 and moving to the previous record the task id is 2818.
Insert a button, name it Next and put the following code in the clicked method
void clicked()
{
super();
element.task(2817);
}
So when you click this button, the cursor will move to the next record in the grid. Some of the other tasks and their ids are given below.
Tasks Task Ids
=======================
New 260
Save 272
Print 278
PrintPreview 299
Cut 770
Copy 771
Paste 772
Find 779
NextRecord 2817
PreviousRecord 2818
FirstRecord 2823
LastRecord 2824
Delete 2832
Comments