hi, hiw can i select a row in the parent row?
when i have in the UltraGrid1_DoubleClickRow event the following check
If Me.UltraGrid1.Selected.Rows.Count > 0 Then
i have always count one eual if i click in a parent row or in a child row. but i want only parent rows selectable
in the init i have
Me.UltraGrid1.DisplayLayout.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.Single Me.UltraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect
If you are applying these settings and you are still able to select a row in the child band, then something is wrong. Maybe you are loading a layout into the grid which is overriding these property settings. Or maybe you are confusing selection with activation. SelectTypeRow has nothing to do with the active row, and the active row appears highlighted just like a selected row. If that's the case, you might want to try this:
FAQ:How do I turn off the ActiveRowAppearance so that the active row in the grid does not appear selected.
Either way, none of this has any effect on the DoubleClick event of the grid or even the DoubleClickRow event. You cannot stop DoubleClick from firing. But you could, of course, ignore it based on which row you are on.
Hi Mike, i set in the InitializeLayout now e.Layout.Bands(0).Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.Single e.Layout.Bands(0).Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect
and
e.Layout.Bands(1).Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.None e.Layout.Bands(1).Override.SelectTypeCell = Infragistics.Win.UltraWinGrid.SelectType.None
but i can still select rows, and also the doubleclick event will fire when i click something in the second band
I'm not sure I understand what you are trying to do. If you want to perform an action in the DoubleClickRow event, then you should simply check the grid.ActiveRow and examine the Band property of the row to determine if it's a row you want to process. It doesn't really make much sense to use selection in that case.
But if you want to prevent the user from selecting rows in the child band, you could set the SelectTypeRow on the Override for that band to None.