Refreshes the current record (the current data refresh caused by a control modification of the screen)

Source: Internet
Author: User

Recently encountered a problem, need a control modified, assign a value to several other fields,

But there is a problem, or you have to leave the control after the cursor, the other field values will change;

Either the entire picture is reloaded, and the data cursor is re-selected on the first data.

For the above issues, I reviewed the code for the purchase order header status update after the system purchase order is posted to the warehouse.

Code in the Purchformletter \ Mainonserver method, there are the following methods,

Purchformletter::updatecallerdatasource (Purchtable_ds, recordexists, doexecutequery);

After entering, the contents are as follows:

if (recordexists)    {        if  (doexecutequery)        {            purchtable_ds.executequery ();        }         Else         {            purchtable_ds.reread ();            Purchtable_ds.refresh ();            Purchtable_ds.editpurch ();            Purchtable_ds.rereadlines ();        }    }     Else     {        purchtable_ds.research ();    }

As in the code, when the data exists, either just requery the data or perform a refresh of the current record.

Yes, it is.

Purchtable_ds.reread ();p Urchtable_ds.refresh ();

These two lines of code play a role in refreshing the current record.

Refreshes the current record (the current data refresh caused by a control modification of the screen)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.