Home Forums WinForms controls Xceed Grid for WinForms Using a ProgressBar in a Cell as the CellViewerManager not updating when Value changed

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #16724 |

    I have used the example that’s provided with the grid and setup a progessbar in a cell, and it looks nice.

    Although unlike the Demo i’m programatically setting the Value of the cell based on a copy operation (approximately 5-10rows). Each instantiated correctly.

    When I change the value of the cell to a new value, the Cell(progressbar) will not update if the value I set is > the previous value, although if I set the value to < the previous value the Cell(progressbar) updates correctly. If I update the same Cell repeatedly (2-3times) the Cell(progressbar) is updated correctly.

    FYI: I’m using Vista with Frost and Transparency Enabled.

    I’m using the following code to set the value of the cells for my demo. I’ve tried many different settings to get it to update… Am i missing anything? ..

        Private Sub btnGridSet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGridSet.Click
            Dim row As Integer
            row = Integer.Parse(txtRow.Text)
            Dim value As Integer
            value = Integer.Parse(txtValue.Text)
            For Each r As Xceed.Grid.DataRow In GridControl1.DataRows
                Dim rowTag As Integer
                rowTag = CType(r.Tag, Integer)

                If rowTag = row Then

                    With r.Cells(“progress”)
                        .Value = value
                        ‘CType(.CellViewerManager.Control, ProgressBar).Value = value
                    End With

                    Exit For
                End If


        End Sub

    Imported from legacy forums. Posted by Paul (had 1156 views)

    User (Old forums)
    Post count: 23064

    There seems to be a bug in the rendering of the Winforms ProgressBar within the grid.  We have tried with HScrollBar, and there is no problem.

    e.g. :

    m_gridControl.Columns[ 0 ].CellViewerManager = new Xceed.Grid.Viewers.CellViewerManager( new HScrollBar(), “Value” );

    Investigating further, System.Windows.Forms.ProgressBar is full of UnsafeNativeMethods (external Win32 calls), so it is possible the problems originate from there.

    In any case, the workaround would be to find another ProgressBar control to use in the gird, or create your own.

    Imported from legacy forums. Posted by André (had 251 views)

    User (Old forums)
    Post count: 23064

    THanks, I figuredas much, so reworked my control to not use the Xceed grid for this particular part. I’m using just a usercontrol of my own that places a ProgressBar on it and my control sets the value.

    Imported from legacy forums. Posted by Paul (had 740 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.