Yeah I know the title sounds funny. It is, but like kids they are going to make me crazy.
Ok here is the stiuation. I need to get the transactiontableid datavalue if it is changed (band 2) then the elementid displaytext (band 1?) and the AllocatorID (band 2 child 1?) and then change the value list in RuleName (band 2 child 1 child 1?). The valuelist for RuleName would also be changed for all allocatordetail childs in such manner. I have tried Parent, Selected row and nothing is working. Please help and thank you....
url for full image is http://www.kjmsolutions.com/images/gridconfusion.jpg
your totally right. I have got the values corrected now thanks to you. Now just trying to put the new values in the valuelist. So far like this.....
Dim oClm As UltraGridColumn
For Each oBand In dgElements.DisplayLayout.Bands
oBand.Columns("RuleName").ValueList = RulesList
Case Else
End Select
Next
I'm not sure why you're dealing with selected rows here, it seems like it would make the logic more complex, especially if you later actually do need to deal with selection. You can get the row from e.Cell in the AfterCellUpdate (or CellChange) events, at which point you should be able to traverse up the parent hierarchy (via the row.ParentRow) property, or down through the children (via row.ChildBands[key/index].Rows).
-Matt
ok sorry I missed your post. I moved it to this event and it bails if it is not that cell which is good. Now I bet I have to change that code.
This is what I have so far in the before cell activate event so far. I get index outside of an array when I click the cell.
dgElements.Selected.Rows(0).ParentRow.Selected = True
For Each bandChild In dgElements.Selected.Rows(0).ParentRow.ChildBands 'Rows.ParentRow.ChildBands 'ActiveRow.ChildBands 'ParentRow.ChildBands
If bandChild.Rows.Count - 1 > -1 Then
Case 0
ElementID = Me.dgElements.ActiveRow.ParentRow.ChildBands(0).Rows(0).Cells(0).Value 'bandChild.Rows(0).Cells(0).Value
trantableid = bandChild.Rows(0).Cells(4).Value
allocatorid = bandChild.Rows(0).Cells("AllocatorID").Value 'bandChild.Rows(0).ChildBands(0).Rows(0).Cells("AllocatorID").Value()
'Exit For
allocatorid = bandChild.Rows(0).Cells("AllocatorID").Value 'allocatorid = bandChild.Rows(0).Cells("AllocatorID").Value
End If
What do you mean fire for everything? In the AfterCellUpdate event, you can check e.Cell.Column.Key to see if it is the TransactionTableID column, then take action accordingly.