I have an UltraWinGrid with two bands: Band A and Band B.
I need to refresh the data from DB every 5 seconds. In timer tick I call to function:
private void LoadData()
this.bandATableAdapter1.Fill(this.WebDataSet1.bandATable);
}
The problem is that grid blims and if I open the second band, after reloading data it closes by itself...
I tried to call to LoadData() function from backgroud thread, but the result is the same.
Any suggestions?
I think that by default the table adapter is going to clear the previous contents of your table and re-fill it, which would cause the grid to get a Reset notification, discarding the previous rows and needing to regenerate them. Calling LoadData on a separate thread would likely not help the problem either, and would in fact likely cause more problems because now you're causing the UI to be updated asynchronously, which you cannot do in .NET. The best solution is, I think, to set the ClearBeforeFill property of each of the table adapters to False.
-Matt