dataset share between 2 user controls

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

I have 2 user controls that both share the same typed dataset (which uses
the typical parent child relationship). The first control fills the dataset
and then passes a reference to it to the second control. There is a time
when the first control needs to update the data in the dataset and re-fills
it. However, when that is done, the second control does not "see" that
change as the pointers to the memory locations are now out of sync. Does
anyone know how to get it so that if my first control updates the dataset,
the pointers will remain the same, so that the second control can "see" the
new data? I tried creating a temporary dataset, filling it, and then
copying it to the original, but that didn't seem to work either. Any
thoughts would be greatly appreciated.
 
What is the code ? If both are sharing the same dataset it should work ?! Or
is the dataset recreated in which case one of the control now uses the new
dataset while the other has a reference to the "old" one ?

Patrice
 
Right, I thought that it should work too, but when I re-fill the one dataset
it's actually running a webservice, so it's recreating the entire dataset.
Would like to avoid having to resend the new dataset each time.
 
Back
Top