I've got a hierarchy gridView in my winform that allows the user to pick items to include.
In the hierarchy the parent is a "category", and the child rows are "category items".
In the grid, there's 2 columns for both the parents and children: a checkbox (Include?) and a textbox ("category name" for parent rows, "item name" for child rows).
The checkbox in the parent row in the grid is equivalent to a "Select All" at the top of a grid used to check all items, but instead of checking all items in the grid, when check, only the checkbox of it's child rows should be checked. This way the user can pick individual "items" to include, or all items in a category, by clicking one checkbox.
The primary problem I've had with this is that when a parent row checkbox item is checked, the checkboxes of that category's child rows don't get checked until a second checkbox in the grid is checked. It's like the checkbox checking/unchecking isn't actually performed until another event fires.
I've tried handling this in rowChanged, valueChanged, CellEndEdit, CellValueChanged, and other events, and they all seem to do what I want in debugging, but the visible checking of child row checkboxes doesn't happen when it should.
I'm opposed to posting any of the code I've tried since I've tried so many approaches and just seem to be going round and round, but will instead put it in pseudocode format. So here's what I'm trying to accomplish:
Private Sub gridItems_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles gridItems.ValueChanged
'If the changed item is a parent row checkbox Then
' For each childRow in currentRow.childRows
' childRow.checkboxColumn.checkboxEditor.Value = currentRow.checkboxColumn.checkBoxEditor.Value
Thank you in advance for any suggestions and advice.