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
85
How do I delete multiple selected rows of ultrawingrid?
posted

Using version 6.1.

This code (VB.NET) works, but it deletes the wrong items:

        Dim i As Integer = 0
        Dim uRow As Infragistics.Win.UltraWinGrid.UltraGridRow
        Dim cnt As Integer()
        Dim iSelCnt As Integer

        iSelCnt = Me.ugrdDTLogLog.Selected.Rows.Count
        If iSelCnt > 0 Then

            ReDim cnt(iSelCnt)

            For Each uRow In Me.ugrdDTLogLog.Rows
                If uRow.Selected = True Then
                    cnt(i) = uRow.Index
                    i = i + 1
                End If

            Next

            For i = cnt.Length - 1 To 0 Step -1
                Me.ugrdDTLogLog.Rows(cnt(i)).Delete(False)
            Next

        End If