Infragistics UltraWinGrid programatically select all rows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ettenurb

    #1

    Infragistics UltraWinGrid programatically select all rows

    I was hoping someone has come across this and came up with a solution.

    We have upgraded our custom software to us Infragistics UltraWinGrid
    2006 CLR 2.0. The code below worked with a previous release of the
    UltraWinGrid.

    When the user clicks on the 'Select All' button this code is selecting
    all rows in the grid. The grid has band(0) and band(1) (Parent and
    multiple children)

    Private Sub btnSelectAll_Cl ick(ByVal sender As System.Object, ByVal e
    As System.EventArg s) Handles btnSelectAll.Cl ick
    Dim row As UltraGridRow
    Dim childRow As UltraGridRow
    For Each row In ugConvertPlans. Rows
    row.Selected = True
    If row.HasChild Then
    childRow =
    row.GetChild(In fragistics.Win. UltraWinGrid.Ch ildRow.First)
    childRow.Select ed = True
    Do While childRow.HasNex tSibling
    childRow = childRow.GetSib ling(SiblingRow .Next)
    childRow.Select ed = True
    Loop
    End If
    Next
    End Sub

    I notice what is happening is that - First the first row is selected.
    Then the child row is selected and when that happens, the first row is
    deselected. Then when the second row is selected and when that happens,
    the children of the first row are deselected and so on. After this
    executes completely, only the children of the second (last) row are
    selected. In a previous version of the ultraWinGrid all rows were
    selected after running the code above.

    I have also tried the statement below but it will only select the first
    bands rows (band(0))
    me.ugConvertPla ns.Selected.Row s.AddRange(CTyp e(me.ugConvertP lans.Rows.All,
    ultragridrow()) )

    Any feedback on this is greatly appreciated.

    Thanks in advance.

    Ettenurb

  • Ettenurb

    #2
    Re: Infragistics UltraWinGrid programatically select all rows


    Ettenurb wrote:
    I was hoping someone has come across this and came up with a solution.
    >
    We have upgraded our custom software to us Infragistics UltraWinGrid
    2006 CLR 2.0. The code below worked with a previous release of the
    UltraWinGrid.
    >
    When the user clicks on the 'Select All' button this code is selecting
    all rows in the grid. The grid has band(0) and band(1) (Parent and
    multiple children)
    >
    Private Sub btnSelectAll_Cl ick(ByVal sender As System.Object, ByVal e
    As System.EventArg s) Handles btnSelectAll.Cl ick
    Dim row As UltraGridRow
    Dim childRow As UltraGridRow
    For Each row In ugConvertPlans. Rows
    row.Selected = True
    If row.HasChild Then
    childRow =
    row.GetChild(In fragistics.Win. UltraWinGrid.Ch ildRow.First)
    childRow.Select ed = True
    Do While childRow.HasNex tSibling
    childRow = childRow.GetSib ling(SiblingRow .Next)
    childRow.Select ed = True
    Loop
    End If
    Next
    End Sub
    >
    I notice what is happening is that - First the first row is selected.
    Then the child row is selected and when that happens, the first row is
    deselected. Then when the second row is selected and when that happens,
    the children of the first row are deselected and so on. After this
    executes completely, only the children of the second (last) row are
    selected. In a previous version of the ultraWinGrid all rows were
    selected after running the code above.
    >
    I have also tried the statement below but it will only select the first
    bands rows (band(0))
    me.ugConvertPla ns.Selected.Row s.AddRange(CTyp e(me.ugConvertP lans.Rows.All,
    ultragridrow()) )
    >
    Any feedback on this is greatly appreciated.
    >
    Thanks in advance.
    >
    Ettenurb

    Comment

    • Ettenurb

      #3
      Re: Infragistics UltraWinGrid programatically select all rows

      FYI -

      Below is the response we received from Infragistics. Our workaround is
      to expand the grid and select all rows from the second band.

      Response..
      In UltraWinGrid, the multiple rows are selected on UltraWinGrid's Band
      Basis. So, it is not possible to select multiple rows of different
      bands, this can be done for a particular band only.

      I apologize for the inconvenience that you may have to face. Please let
      me know for any further assistance regarding this issue.

      Comment

      Working...