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
465
Freeze first column from scrolling
posted

Hi all,

I have a problem with freezing one column on my grid. I am following rules doing this:

private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e)
{
            e.Layout.UseFixedHeaders = true;

            // Fix the second column. This will cause this column to be moved before any
            // non-fixed columns.
            e.Layout.Bands[0].Columns[0].Header.Fixed = true;
}

It seems that is not enough to work. I can still scroll first column on my grid.

I have my grid and UltraDataSource linked with this grid which I am providing with data ( I have designed whole layout and data structure in ) for this grid.
Maybe that is the problem.

Any suggestions ?

Piotr

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Piotr,

    I don't see anything wrong with this code, so there are only two reasons I can think of why this would not work:

    1) Something in your code that occurs after this is undoing it. Perhaps you are loading a layout into the grid after this code fires?

    2) You are using RowLayouts. RowLayouts and fixed headers are mutually exclusive.

Children