HI,
I have a grid of data with multiple bands, each band has the same columns. I want to freeze the first column in each band so that when you scroll to the right you always have that column visible.
To do this I have this at the end of my InitialiseRow method:
for (int i = 0; i < _positionsGrid.DisplayLayout.Bands.Count; i++) { _positionsGrid.DisplayLayout.Bands[i].UseRowLayout = false; _positionsGrid.DisplayLayout.Bands[i].Columns[0].Header.Fixed = true; }
But when the grid appears it only freezes the column at the lowest band, so when I scroll that column remains fixed but that the columns in the uppers band scroll.
Am I doing something wrong?
You might want to consider moving the code to InitializeLayout as you only need to run it once and not every time a row is initialized.
I'm guessing that you have hidden columns in the bands where no column is frozen. You could try accessing first visible column, e.g. something like this:
Dim band As UltraGridBandDim col As UltraGridColumn
For Each band In e.Layout.Bands col = band.GetFirstVisibleCol(e.Layout.ColScrollRegions(0), False, False) col.Header.Fixed = TrueNext