ProgressBar showing up at top left in grid instead of correct row

May 25, 2010 at 4:42 PM
Edited May 25, 2010 at 4:43 PM
I have a grid with multiple columns including a ProgressBar.

Whenever I add a row and update the grid, the ProgressBar shows up at the top left of the grid, instead of the specific location. If i adjust the size of the form, the ProgressBar automatically adjusts to the correct spot in the form. It appears that I am using the same code as found in Sample03.cs of the examples.

gridDevices[r, ctr] = new SourceGrid.Cells.Cell("");
ProgressBar progressBar = new ProgressBar();
progressBar.Value = 25;
gridDevices.LinkedControls.Add(new SourceGrid.LinkedControlValue(progressBar, new SourceGrid.Position(r, ctr++)));

I tried hard coding the column counter, but that resulted in the same issue. Also, if another row is added, the ProgressBar moves into the correct position for the previous row, but the new ProgressBar is placed in the top left of the grid.

Any suggestions?

May 25, 2010 at 5:05 PM
I found my issue.
It helps to have your code not crash before it gets to the Refresh method