Hi there,
Just a quick question for you all: How can I get access to the SystemRows or the header row/cells of a child collection that's empty? Generally if I wanted to access those guys for a row that already exists I'd go
((GridViewDataRowInfo)row).ViewInfo.SystemRows
or
((GridViewDataRowInfo)row).ViewInfo.TableHeaderRow
respectively, but I can't figure out how to get access to those guys for an empty child collection because there's no "row" object I can latch onto if the parent's ChildRows is empty. I know they exist somewhere though because they're sitting there on my screen. I just feel like I must be missing something simple.
For reference, I'd like to set the child NewRow as the currently selected row when a new hierarchy row is created (so insertion would drill through the hierarchy, following the way my users would prefer to enter data) and I need to force an InvalidateRow on a child HeaderRow so that it fires the ViewCellFormatting event when the value of a certain cell is changed (so I can set the header text of the child view even if there are no children yet).
As an aside, in an attempt to solve the second issue I've tried to fire the grid.TableElement.Update() method with a parameter of GridUINotifyAction.Reset and GridUINotifyAction.DataChanged in my grid_CellValueChanged event, and it's throwing exceptions up to my Main method (bypassing my try/catch around the actual Update() call). Not sure if that's intentional/expected.
Thanks for any direction!
Just a quick question for you all: How can I get access to the SystemRows or the header row/cells of a child collection that's empty? Generally if I wanted to access those guys for a row that already exists I'd go
((GridViewDataRowInfo)row).ViewInfo.SystemRows
or
((GridViewDataRowInfo)row).ViewInfo.TableHeaderRow
respectively, but I can't figure out how to get access to those guys for an empty child collection because there's no "row" object I can latch onto if the parent's ChildRows is empty. I know they exist somewhere though because they're sitting there on my screen. I just feel like I must be missing something simple.
For reference, I'd like to set the child NewRow as the currently selected row when a new hierarchy row is created (so insertion would drill through the hierarchy, following the way my users would prefer to enter data) and I need to force an InvalidateRow on a child HeaderRow so that it fires the ViewCellFormatting event when the value of a certain cell is changed (so I can set the header text of the child view even if there are no children yet).
As an aside, in an attempt to solve the second issue I've tried to fire the grid.TableElement.Update() method with a parameter of GridUINotifyAction.Reset and GridUINotifyAction.DataChanged in my grid_CellValueChanged event, and it's throwing exceptions up to my Main method (bypassing my try/catch around the actual Update() call). Not sure if that's intentional/expected.
Thanks for any direction!