BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
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
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.
Hi Gobinath,
none of these properties are available for GridControl (note: not DataGrid)
So how to do it ?
Thanks,
Fabrice
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