I am using the synfusion GridControl in my application.The user can select a text file and data from the file is displayed in the grid. Each and every time the grid is populated the column width is set using the code.
_gridPDD.ColWidths.SetSize(i, columnWidth);
where columnWidth will hold some fixed value based on the type of data displayed in the column.
Now the below test case works differently-
The user changes the width of the columns in the grid by dragging the edge of columns. When a new file is opened in the application and the grid is populated the columns are not shown with the default width (width set with the above line of code) instead they are set with the width of the columns in the previous section ( The width of column after the user perform a drag ).
Any help in this... Is there any property in the syncfusion GridControl that makes this behaviour? How to avoid this behaviour?
Thank you for your interest in Syncfusion products.
Your problem is the size(the width of column after the user perform a drag ) getting modified. In order to resolve this please restrict the resizing option using ResizeColsBehaviour. You may be resizing(by dragging the columns) to view the data. For that you can use AllowPropotionalColumnSizing. This allows you to resize the columns proportionately as per the data size.
Code Snippet:
//to restrict the resizing option using drag
this.grid.Model.Options.ResizeColsBehavior = GridResizeCellsBehavior.None;
//to resize the columnpropotionatelt according to the column data
this.grid.AllowProportionalColumnSizing = true;
Reference : http://www.syncfusion.com/kb/695/how-to-prevent-column-resizing-for-child-tables-in-gridgroupingcontrol
http://www.syncfusion.com/kb/4853/how-to-optimize-the-resizetofit-method-for-large-number-of-records
Please let us know if your requirement is different from this.
Thanks & Regards, AL.Solai.