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
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
If grow.Index = ind Then
MsgBox(grow.Rows(0).index)
End If
Next
I implemented your code and am getting the below exception error:
{"Unable to cast object of type 'Infragistics.Win.UltraWinGrid.UltraGridRow' to type 'Infragistics.Win.UltraWinGrid.UltraGridGroupByRow'."}
on the line:
For Each grow As UltraGridGroupByRow In Me.grdAllProposals.Rows
any suggestions?
Thanks!