Forcing data bound controls to be populated before showing form

  • Thread starter Thread starter David Scemama
  • Start date Start date
D

David Scemama

Hi,

I have a problem invoking a forced refresh of data from a data source
into a data bound control. My reason for forcing a refresh is as follows:

I have a form that can be used in two ways. First, it can be displayed
as usual. Second, it can be used to print stuff, without showing any
display interface.

For the second usage, I do my print processing in ShowDialog and return
without calling myBase.ShowDialog. It works great, except on some
circomstances where there are bound controls values that need to be
printed. I am finding that the value of the data bound control is
only set when I show the WinForm, witch is undesirable in my case.

Summary: How can I force data to be populated into data bound controls
_before_ the form is shown?

I understand that there is a protected method BindingManagerBase.PushData.
Can I/should I utilise this? Is there another solution to this problem?

Regards

David
 
Back
Top