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

allowresize=false for allo lines and columns in c# code ?

Thread ID:





114078 Oct 27,2013 12:29 PM UTC Nov 27,2013 05:46 AM UTC WPF 3
Tags: GridControl
Asked On October 27, 2013 12:29 PM UTC


Set that in order to forbid user to resize column width and line height

How is that possible in the grid definition parameter, when the grid is created on-the-fly programatically ? (so not in XAML and not by catching an interuption)

Related to that, it would be good to have a list of all possible grid setup parameters( .Model.RowCount .Model.ColumnCount .AllowDragColumns .Model.TableStyle.IsThreeState .Model.HeaderColumns .Model.FrozenColumns .Model.HeaderRows .Model..Model.TableStyle.Borders.All .Model.TableStyle.Background = Brushes.Transparent .Model.HeaderStyle.Background = Brushes.Transparent .Model.ColumnWidths[0] = ....)

.... and not to find them one by one spreaded in all code examples or forum threads



Gobinath A [Syncfusion]
Replied On November 22, 2013 11:31 AM UTC

Hi Fabrice,


Thanks for using Syncfusion products.


We have analyzed your query and you can disable the resizing of Column/Row by setting the following highlighted API in your application.


Code snippet[XAML]

<syncfusion:GridDataControl Name="syncgrid"





                                    ItemsSource="{Binding GDCSource}" >




Please refer the below link for know about the Major Control Classes setup.


Link: http://help.syncfusion.com/ug/wpf/grid/documents/42griddatacontrol1.htm


Please let us know if you have any queries.


Gobinath A.


Replied On November 23, 2013 09:42 AM UTC

Hi Gobinath,

none of these properties are available for GridControl (note: not DataGrid)

So how to do it ?



Kasthuriraja G [Syncfusion]
Replied On November 27, 2013 05:46 AM UTC

Hi Fabrice,

We have analyzed your query and you can disable the resizing of Column/Row by using ResizingColumns and ResizingRows Events in GridContol. You can achieve your requirement by using the following code snippet.

Code snippet[C#]

grid.ResizingColumns += new GridResizingColumnsEventHandler(grid_ResizingColumns);

 grid.ResizingRows+=new GridResizingRowsEventHandler(grid_ResizingRows);

 private void grid_ResizingColumns(object sender, GridResizingColumnsEventArgs args)


             args.AllowResize = false;



 private void grid_ResizingRows(object sender, GridResizingRowsEventArgs args)


         args.AllowResize = false;




Please refer the solution given below:

Solution: AllowResize.zip

Please let us know if you have any queries.




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

or the page will be automatically redirected to 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