I have a parent/child relation in ultrawingrid. I want to be able to select multiple child rows but within the same parent. if the user selects from a different parent, i do not want to allow that selection. Is there any way we can do this?
For our purposes, using BeforeSelectChange wasn't quite what we wanted as you could still have an active row "selected" under a different parent. We ended up using something like this:
private void ultraGrid1_BeforeRowActivate(object sender, RowEventArgs e) { var firstSelectedInBand = ultraGrid1.Selected.Rows.OfType() .FirstOrDefault(x => x.Band == e.Row.Band); if (firstSelectedInBand == null) return; if (e.Row.ParentCollection != firstSelectedInBand.ParentCollection) ugPlan.Selected.Rows.Clear(); }