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 : Nov 16th 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:

Created:

Updated:

Platform:

Replies:

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

Hi

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


Thanks,

Fabrice


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"

                                    UpdateMode="PropertyChanged"

                                    AllowResizeColumns="False"

                                    AllowResizeRows="False"

                                    NotifyPropertyChanges="True"

                                    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.

 

Regards,
Gobinath A.

 


fff
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 ?

Thanks,

Fabrice


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.

Regards,

Kasthuriraja.G


CONFIRMATION

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.

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

;