General X++ Development

How do I refresh a form control in X++?

Asked by Sunny Vasty· Aug 13, 2026· 1 answers

How do I refresh a form control in X++?

SSunny Vasty75 reputation · answered Aug 13, 2026

Most of the time, you should refresh the datasource or underlying field instead of trying to force one control to repaint.

For a bound value:

X++
MyTable_ds.refresh();

If the database value changed outside the current buffer:

X++
MyTable_ds.reread();
MyTable_ds.refresh();

If you are changing control properties such as visibility or enabled state, set those properties directly on the control.