Hi Russell,
Regarding CustomControl:
You can try handling the QueryCellStyleInfo event. But calling the ReSizeToFit method in the QueryCellStyleInfo event makes the recursive call. So you can set the ColWidth of the cell by using the CalculatePreferredCellSize method. Here is a code snippet.
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if( e.TableCellIdentity.Column != null)
{
GridGroupingControl grid = sender as GridGroupingControl;
using( Graphics grp = grid.CreateGraphics())
{
//For getting the Right ColWidth...
Size size = e.Style.CellModel.CalculatePreferredCellSize(grp,e.TableCellIdentity.RowIndex,e.TableCellIdentity.ColIndex,e.Style,GridQueryBounds.Width);
//For getting the Right RowHeight...
///Size size = e.Style.CellModel.CalculatePreferredCellSize(grp,e.TableCellIdentity.RowIndex,e.TableCellIdentity.ColIndex,e.Style,GridQueryBounds.Height);
if( e.TableCellIdentity.Column.Width < size.Width)
e.TableCellIdentity.Column.Width = size.Width;
}
}
}
Setting the individualized rowheights in a GridGroupingControl, see this.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=60033Regarding Autosize property:
If you set AutoSize property to Truw, the cell height should automatically increase when the edited text does not fit into the cell and WrapText is True. If WrapText is False, AutoSize will affect the column width.
Best regards,
Haneef