P
peancor
Hello,
I have an UserControl with a BindingSource linked to a datagrid.
if i create the control and show it in a form and then try to set the
DataSource property from a non-UI thread i get a CrossThreadException as
expected. But if I only Create the control whithout showing it and then
set the datasource property from a non-UI thread and then show the
control from the UI thread all seems to work fine.
The question is. Is that correct or can i get some unexpected
behaviour?.
I am trying to do this because setting the datasource takes a long time
and lets the ui thread irresponsive.
I have an UserControl with a BindingSource linked to a datagrid.
if i create the control and show it in a form and then try to set the
DataSource property from a non-UI thread i get a CrossThreadException as
expected. But if I only Create the control whithout showing it and then
set the datasource property from a non-UI thread and then show the
control from the UI thread all seems to work fine.
The question is. Is that correct or can i get some unexpected
behaviour?.
I am trying to do this because setting the datasource takes a long time
and lets the ui thread irresponsive.