Spread Silverlight Documentation
AutoFitColumn Method (GcSpreadSheet)
Example 


GrapeCity.Windows.SpreadSheet.UI Namespace > GcSpreadSheet Class : AutoFitColumn Method
Automatically fits the viewport column.
Overload List
OverloadDescription
Automatically fits the viewport column.  
Automatically fits the viewport column.  
Example
This example uses the AutoFitColumn method.
gcSpreadSheet1.Sheets[0].Cells[1, 1].Value = "testAutoFit";
gcSpreadSheet1.Sheets[0].Cells[1, 1].FontSize = 14;
gcSpreadSheet1.Invalidate();

private void Button_Click(object sender, RoutedEventArgs e)
{
     gcSpreadSheet1.AutoFitColumn(1);
     gcSpreadSheet1.AutoFitRow(1);
}
GcSpreadSheet1.Sheets(0).Cells(1, 1).Value = "testAutoFit"
GcSpreadSheet1.Sheets(0).Cells(1, 1).FontSize = 12
GcSpreadSheet1.Invalidate()

Private Sub Button_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
     GcSpreadSheet1.AutoFitRow(1)
     GcSpreadSheet1.AutoFitColumn(1)
End Sub
See Also

Reference

GcSpreadSheet Class
GcSpreadSheet Members