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
555
ExclusiveColScrollRegion is null, column appears twice
posted

I would like to implement a grid where the columns appear only once in one of two ColScrollRegions:

Col 1,2 in ColScrollRegion0 and Col 3, in ColScrollRegion1.

Belonging to some former post I have to set the column header ExclusiveColScrollRegion property to the desired ColScrollRegion.

But it doesn't work: the col 1-3 appear still in both ColScrollRegions and the ExclusiveColScrollRegion property remains null after assignment.

Here is the code

private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e)

{

.....

UltraGridLayout layout = e.Layout;

ColScrollRegion colScrollRegion2 = new ColScrollRegion(1);

layout.ColScrollRegions.Add(colScrollRegion2);

UltraGridBand band = layout.Bands[0];

band.Columns[0].Header.ExclusiveColScrollRegion = layout.ColScrollRegions[0];

band.Columns[1].Header.ExclusiveColScrollRegion = layout.ColScrollRegions[0];

band.Columns[2].Header.ExclusiveColScrollRegion = layout.ColScrollRegions[1];

....

}

 

Whats wrong, thanks for a hint.

kagel

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    What do you mean by: "the ExclusiveColScrollRegion property remains null after assignment."

    Are you saying that you are setting this property and then examining the value immediately after you set it and it's returning null? I have no explanation for that and I've never heard of anything like that happening before. Maybe something else in your code is removing the ColScrollRegions and then re-adding them later on.

    My best guess is that something that is happening in your code after this code is executed must be blowing these settings away. Maybe you are loading a layout into the grid?

    Frankly, ColScrollRegions are something of an obsolete concept, anyway. This functionality was essentially replace by fixed headers.

Children