Hi, when i have a normal grid i use initializerow to change the content of a cell for each row
Private Sub UltraGrid1_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles UltraGrid1.InitializeRow
Select Case CType(e.Row.Cells("Status_Cont").Value, Integer) Case Cont_Data.Auftrag_Status.Bestellt e.Row.Cells("Status_Text").Value = "Test1"
......Now i have a hierarchical grid (parent and child).now how can i find my column in the child band?when i go in the event initializerow iam always in the parent band.
What are you trying to do here?
As I said, the InitializeRow event fires for every row regardless of what band it's in. So if you just want to perform some operation on the row, you are better off waiting until the event fires for that row.
Danko simply left out the indexer into the rows collection in the line of code he posted here:
Dim nValue As Integer = e.Row.ChildBands(0).Rows(X).Cells("Status_Cont").Value
hi danko, if i write Dim nValue As Integer = e.Row.ChildBands(0).Rows.Cells("Status_Cont").Valuei goterror70 "Cells" is not a member of "Infragistics.Win.UltraWinGrid.RowsCollection".
test of the column worksIf e.Row.ChildBands(0).Band.Columns.Exists("Status_Cont") Then...
end if
but how can i get the value of the cell
InitializeRow fires for all rows in the grid. It's not limited to any particular band.
Hello,
I think that you would be able to access the child band doing something like this:
private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e) { e.Row.ChildBands[1].Band.Columns["Desired Column Key"].. e.Row.ChildBands[1].Rows.Cells["Desired Column Key"].. }
Hope this helps