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
115
Current Row when selecting a row to expand.
posted

vs2005 - winforms - ultragrid 

I have a situation where I am trying to capture the row number on the row that is being expanded.  When I click on the "+" to expand the child rows, the currentrow returns what row was physically selected, not the row that I am trying to expand.  I am trying to capture the current row on the AfterRowExpanded event.

 

Any help would be fantastic.

 Thanks in advance.

 Wayne

 

Parents
  • 385
    posted

    Hi Im not sure this is what you are after but it's the best I can do.

    If you return the Index on e.Row after AfterRowExpanded event is fired you get the index of the GroupByRow that has got a row collection in it.

    If you want the index of the first row in the GroupByRow Rows collection I don't think there is a direct way to do that.

    But you can try something like this:

    Dim ind As Integer

    ind = e.Row.Index

    For Each grow As UltraGridGroupByRow In Me.MyGrid.Rows

    If grow.Index = ind Then

    MsgBox(grow.Rows(0).index)

    End If

    Next

Reply Children