Infragistics UltraWinGrid programatically select all rows

E

Ettenurb

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_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnSelectAll.Click
Dim row As UltraGridRow
Dim childRow As UltraGridRow
For Each row In ugConvertPlans.Rows
row.Selected = True
If row.HasChild Then
childRow =
row.GetChild(Infragistics.Win.UltraWinGrid.ChildRow.First)
childRow.Selected = True
Do While childRow.HasNextSibling
childRow = childRow.GetSibling(SiblingRow.Next)
childRow.Selected = 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.ugConvertPlans.Selected.Rows.AddRange(CType(me.ugConvertPlans.Rows.All,
ultragridrow()))

Any feedback on this is greatly appreciated.

Thanks in advance.

Ettenurb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top