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
130
Lock a column
posted

How can I lock a column for a long data grid ?

I'd like to lock the column to avoid scroll action in it.

I have a row with an 'Hotel' column and a lot of 'Date' columns, and I'd like to scroll along date columns and lock 'Hotel' column.

How can do it?

Parents
  • 37774
    posted

     You would set the Fixed property on the column's header, after also making sure that you've turned on fixed headers for the grid.  

    private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e)
    {
        e.Layout.UseFixedHeaders = true;
        e.Layout.Bands[0].Columns["Hotel"].Header.Fixed = true;
    }

    -Matt

Reply Children