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

Freeze Column to right of grid

Hi,

I'm using the GridControl currently and investigating the Freeze Columns functionality, I was wondering if there was a way to pin the columns to the right hand side of the grid as opposed to the default of the left hand side?

- Cormac

1 Reply

AA Arulraj A Syncfusion Team December 12, 2018 08:43 AM UTC

Hi Cormac, 

Thanks for using Syncfusion product. 

By default, GridControl does not have the support to freeze the columns form left. But, you could achieve your reported scenario by adjusting two grids location and size. We have implemented the FrozenColum and provided the RightFrozenColCount property. Please refer the following code example and the sample, 

Code example 
FrozenColumn frozenColumn = new FrozenColumn(); 
frozenColumn.RightFrozenColCount = 3; 
fr.WireFrozenRow(this.gridControl1); 
 
public void SetFrozenColumn() 
{ 
    this.grid.ResetGridBounds(); 
 
    this.grid.GridBounds = new Rectangle(this.grid.GridBounds.X, 
        this.grid.GridBounds.Y, 
        this.grid.GridBounds.Width - (RightFrozenColCount * this.grid.DefaultColWidth), 
        this.grid.GridBounds.Height); 
 
    this.FrozenColumnGrid.Location = new Point(this.grid.GridBounds.Width,0); 
 
    this.FrozenColumnGrid.Size = new Size((RightFrozenColCount * this.grid.DefaultColWidth), this.grid.ClientSize.Height); 
} 
 

Please let us know if you have any concerns. 

Arulraj A 


Loader.
Live Chat Icon For mobile
Up arrow icon