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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Prevent column resizing

Thread ID:





123810 Apr 22,2016 09:46 PM UTC May 9,2016 10:19 AM UTC WPF 3
Tags: GridTreeControl
Asked On April 22, 2016 09:46 PM UTC

How do you prevent the user resizing the columns? I want all of them to be fixed.

Jai Ganesh S [Syncfusion]
Replied On April 25, 2016 06:31 AM UTC

Hi Richard, 
You can prevent the resizing in SfDataGrid by setting the “AllowResizingColumns=Fasle” in Grid or you can prevent the resizing for particular column by setting the “AllowResizing=False” in GridColumn like below code example, 
Code Example: 
<Syncfusion:SfDataGrid x:Name="SfdataGrid"  
<Syncfusion:GridTextColumn MappingName="EmployeeName" AllowResizing="False"    /> 
Jai Ganesh S 

Replied On May 7, 2016 10:23 AM UTC

Well that had me confused for a bit. My question relates to the GridTreeControl not the DataGrid. The properties you suggest do not appear to be available n the GridTreeControl.

Jai Ganesh S [Syncfusion]
Replied On May 9, 2016 10:19 AM UTC

Hi Richard, 
Sorry for the inconvenience. The GridTreeControl not have a direct API to prevent the resizing for columns. However you can achieve this by wiring the ResizingColumns event like below, 
this.treeGrid.Loaded += treeGrid_Loaded; 
void treeGrid_Loaded(object sender, RoutedEventArgs e) 
     this.treeGrid.InternalGrid.ResizingColumns += InternalGrid_ResizingColumns; 
void InternalGrid_ResizingColumns(object sender, GridResizingColumnsEventArgs args) 
     args.AllowResize = false; 
Jai Ganesh S 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon