Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
Two grids updating same time where it shouldn't
posted

I have a form with two ultragrids; one is showed on screen and the other is hidden.

I fill the two grids with columns names and rows names, but they are empty without data.

Then I fill the first grid with data, reading it from a SQL database.

I am showing only three employees on screen at any given time (first grid).

I can print the first grid without problems with Ultragrid.Print method; I did a color printing and black and white printing of those three employees.  The user can move to the next three employees by clicking the right or left arrow on screen and print again.

But the user might want to print all employees, not only those three on screen.

I don’t want the screen to be changed, and three on screen should be those showed.

The printing of all employees should be done behind scene.

So I started to fill the second grid (in a loop) with all the data of all employees reading it again from the SQL database (not from the first grid).

I am positive that I am updating only the second grid (and rows names are different), but the system is updating the first and second grids at the same time and I see the changes on screen where it shouldn’t.

First grid should be static without changes.

Any suggestions?