Using RadVirtualGrid, I have a requirement for showing hierarchical levels of data. The parent level and child levels share the SAME column headers. I am utilizing the QueryHasChildRows event of the grid to set the number of rows for each hierarchical level. In that event I set a few properties to control how a child view is rendered as below:
else if (e.ViewInfo.HierarchyLevel > 0)
var items = ((IList<AllocStructNode>)e.ViewInfo.ParentViewInfo.Tag)[e.ViewInfo.ParentRowIndex];
if (items.Children != null && items.Children.Count > 0)
e.ViewInfo.Tag = items.Children;
e.ViewInfo.RowCount = items.Children.Count;
e.ViewInfo.HeaderRowHeight = 0;
e.ViewInfo.ShowHeaderRow = false;
e.ViewInfo.FilterRowHeight = 0;
e.ViewInfo.ShowFilterRow = false;
e.ViewInfo.Padding = new Padding(0);
e.ViewInfo.HorizontalScrollState = ScrollState.AlwaysHide;
When a new level is rendered, a new demarcated section of child table element with its own horizontal scrolling displayed. When the parent is horizontally scrolled, the child level doesn't scroll (not synchronized). Similarly, when the child is horizontally scrolled, the parent does not scroll as well.
See attached project.