Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
400
Finding Selected Rows in Hierarchical UltraWebGrid
posted

I have a hierarchical grid, 2 bands, and need to find out on the server side which rows are selected (or contain cells that are selected) when the user selects a button.  I can get the Band[0] selections ok, but I can't figure out how to determine what rows of Band[1] are currently selected...

The setup: UltraWebGrid 8.1 that is bound at run time.  The DataSource is a standard DataSet with two tables and a relationship.  The DataSource is set i nthe InitializeDataSource event handler.  The columns for both bands are created in the InitializeLayout handler.  The BaseColumnName is the same as the Key for each column.  Filtering, sorting, and lots of other goodies are enabled.  All of that works fine.  The ViewType is OutlookGroupBy.

The display of the rows is consistently ok.  Rows from Band[0] can be expanded/collapsed and the appropriate Band[1] rows show up in the right places.  As a viewing grid, all is good.  But the server needs to know what rows the user has selected.

If I select a row or a cell from Band[0], the server side button click handler can see valid results in Grid.DisplayLayout.SelectedRows and Grid.DisplayLayout.SelectedCells.  That works ok.

However, selecting something in Band[1] results in pretty much nothing coming back.  Not in SelectedRows or SelectedCells.  I looked at Grid.Rows.Selected, but it has Band[0] rows only.  I tried using Grid.Rows.HasChildRows and Grid.Rows[.Rows, but the values of those were generally wrong (a child is selected, but only the first Band[0] row will show that it has a child, all other Band[0] rows show no ChildRows.  The ChildRow does not show as selected).

I'm stumped...  I'm hoping that the functionality is there but I have not figured out how to access it.  What did I miss?  How does the server figure out what rows of a hierarchical grid are selected?

Thanks,

DaveL

More Info: The client-side events BeforeCellChange and RowSelectorClick do get fired for both Band[0] and Band[1] and they appear to have valid CellID/RowID values passed in.

However, the server side events SelectedRowsChange and SelectedCellsChange DO NOT get fired when a Band[1] row or cell is selected.  They do fire ok when a Band[0] row or cell is fired.

Parents Reply Children
No Data