Tuesday, December 16, 2014

Form datasource find record method

Form datasource find record method

Form datasource find record method to find and set that record as current. So, the user can easily identify the record.

We need to pass the table record as parameter to this findrecord method.

Syntax:

public boolean findRecord(Common record)

For example:


Here, I have added some code in the button click method to find the record in the form datasource. So, that result record will be focused as current record.

void clicked()
{
    Hari_ExamResult examResult;
   
    select firstOnly1 * from examResult
    where examResult.StudentName == 'Hari';
   
    if(examResult)
    {
        Hari_ExamResult_ds.findRecord(examResult);
    }
    super();
}

Result:



Thanks,
Hari

1 comment :