AD
Administrator
Syncfusion Team
July 2, 2009 08:52 PM UTC
Oh, I forgot to mention previously that I am using the GridControl control not the newer GridDataControl control.
MS
Mohamed Suhaib Fahad A.
Syncfusion Team
July 3, 2009 01:24 PM UTC
Hi David,
Thanks for the details.
1) You could listen to the ResizingColumns event to cancel the default resizing and auto-size it through a method call,
void grid_ResizingColumns(object sender, Syncfusion.Windows.Controls.Grid.GridResizingColumnsEventArgs args)
{
if (args.Reason == Syncfusion.Windows.Controls.Grid.GridResizeCellsReason.DoubleClick)
{
args.AllowResize = false;
this.grid.Model.ResizeColumnsToFit(args.Columns, GridResizeToFitOptions.None);
}
}
The ResizeColumnsToFit would do calculate the optimal width and adjust the width.
2) There is a small padding of value 2 is added to each cell by default, this is because when you go into the edit mode the TextBox will occupy an extra space when it comes into focus. And when the text is drawn it doesn't include this padding values. Can you please send me a screenshot of the padding that you are mentioning here.
3) I do not see this issue with the older or the latest version, I would like to have a reproducing sample or video. This would be of great help in quickly identifying the issue.
We also have fixed up some major internal issues, So you may want to try out the Vol3 release when it is out over the coming weeks.
Please let me know if you need any more details.
Thanks,
Fahad
Grid.WPF Team
Syncfusion Inc.,