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
105
UltraWinGrid: Expand grouped colomns
posted

 Hello,

 I have some problem with UltraWinGrid. I modify some Cell when i running, but if i modifed a grouped Cell, le group isn't refresh.

 i programming that for repair the problem

-----------------------------------

     Private Sub UltraGrid_AfterCellUpdate(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles UltraGrid.AfterCellUpdate
        If isGrouped(e.Cell.Column.Index) Then
            ResetGroup()
        End If
    End Sub

    Private Function isGrouped(ByVal Colomns As Integer)
        For i As Integer = 0 To Me.UltraGrid.DisplayLayout.Bands(0).SortedColumns().Count - 1
            If Me.UltraGrid.DisplayLayout.Bands(0).SortedColumns(i).Index = Colomns Then
                Return True
            End If
        Next i
        Return False
    End Function

    Private Sub ResetGroup()
        Dim liste As New Generic.List(Of Colomns)
        For i As Integer = 0 To Me.UltraGrid.DisplayLayout.Bands(0).SortedColumns().Count - 1
            Dim temp As Colomns
            temp.Colomns = Me.UltraGrid.DisplayLayout.Bands(0).SortedColumns(i)
            temp.descending = Me.UltraGrid.DisplayLayout.Bands(0).SortedColumns(i).SortIndicator = Infragistics.Win.UltraWinGrid.SortIndicator.Descending
            temp.groupBy = Me.UltraGrid.DisplayLayout.Bands(0).SortedColumns(i).IsGroupByColumn
            liste.Add(temp)
        Next i
        Me.UltraGrid.DisplayLayout.Bands(0).ColumnFilters.ClearAllFilters()
        Dim iterator As Generic.List(Of Colomns).Enumerator = liste.GetEnumerator
        While iterator.MoveNext
            Me.UltraGrid.DisplayLayout.Bands(0).SortedColumns.Add(iterator.Current.Colomns, iterator.Current.descending, iterator.Current.groupBy)
        End While
    End Sub

-----------------------------------

That work, all group is refresh and if i modify a cell and this cell is grouped, the rows change of group

but the problem, all group is collapse.

How i can expand some group by the code ???

 Thanks

Waxime

Softicket Programmer

http://www.softicket.net

 

Parents Reply Children
No Data