We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Columns Freeze

Hi,

I want the columns to be static, which should not be movable.

How should I do it?
Please help me out.

Thanks & Regards,
Sathish.

2 Replies

SC Sathish Chandran February 13, 2007 02:39 PM UTC

Hi,

In addition to my previous mail, I've attached an sample application.

In the 0th row of the grid, the columns are movable, but in the 1st row of the grid the columns are not movable.

I need the column to be not movable in the 0th row of the grid.

Please help me out.

Thanks & Regards,
Sathish.

>Hi,

I want the columns to be static, which should not be movable.

How should I do it?
Please help me out.

Thanks & Regards,
Sathish.

TreeGridContextMenu1.zip


AD Administrator Syncfusion Team February 13, 2007 06:06 PM UTC

Hi Sathish,

You can set the celltype property of the GridStyleInfo property to "Static" to make a column as static. And also you can refer the Frozen RowsAndCols browser sample shows how to freeze rows, columns and to get and set the frozen columns and rows count. The FreezeSelection method can be used to achieve this. This method moves the selected rows to the start of the grid and then freezes the selection. You can also specify a range of rows to freeze. The FreezeRange method is used for this purpose.

// Freezes the selected columns (Moves them to the start of the grid and sets FrozenCount).
this.gridControl1.Cols.FreezeSelection();

// Freezes the selected Rows (Moves them to the start of the grid and sets FrozenCount).
this.gridControl1.Rows.FreezeSelection();

// Freezes a range of rows.
this.gridControl1.Rows.FreezeRange(2,5);

Sample : FrozenRows AndCols.zip

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon