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
190
ugBusiness_Unit.Selected.Rows.Clear()
posted

Hi All,

I am having trouble clearing selected rows.

Please note, on some computers it works fine, on others is does not work at all.

Please note the code below. Selected rows just will not clear.

I appreciate any advice, as this does not make much sense to me...

Jeff

 

 

Private Sub cmdClear_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClear.Click

Dim ug As UltraGrid, r As UltraGridRow

For Each c As Control In Me.SplitContainer1.Panel1.Controls

If TypeOf c Is UltraGrid Then

ug = c

MsgBox(
"Clearing " & ug.Name)

ug.Selected.Rows.Clear()

For Each r In ug.Rows

r.Selected = False

Next

End If

Next

ugBusiness_Unit.Selected.Rows.Clear()

ugProduct.Selected.Rows.Clear()

ugMfg_Line.Selected.Rows.Clear()

End Sub

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

     Hi Jeff,

    grid.Selected.Rows.Clear should be more than sufficient to clear the selected rows in a grid, You should not need to do any of that other stuff. What exactly is not working?  How many rows are selected before you clear and how many remain selected after? Are you sure any rows are still selected? Perhaps there is simply an ActiveRow? Did you check grid.Selected.Rows.Count after you cleared the selected rows?

Children