GrapeCity.Xaml.SpreadSheet.Data
SetColumnWidth Method
Example 


The column index of the first column.
The sheet area.
The width.
Sets the width using the specified unit type for the specified columns in this sheet.
Syntax
'Declaration
 
Public Sub SetColumnWidth( _
   ByVal column As Integer, _
   ByVal sheetArea As SheetArea, _
   ByVal width As Double _
) 
'Usage
 
Dim instance As Worksheet
Dim column As Integer
Dim sheetArea As SheetArea
Dim width As Double
 
instance.SetColumnWidth(column, sheetArea, width)
public void SetColumnWidth( 
   int column,
   SheetArea sheetArea,
   double width
)

Parameters

column
The column index of the first column.
sheetArea
The sheet area.
width
The width.
Example
This example uses the SetColumnWidth method.
gcSpreadSheet1.Sheets[0].SetValue(0, 0, "value");
gcSpreadSheet1.Sheets[0].AddRows(0, 2);
gcSpreadSheet1.Sheets[0].AddColumns(0, 2);
gcSpreadSheet1.Sheets[0].SetRowHeight(0, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, 50d);
gcSpreadSheet1.Sheets[0].SetColumnWidth(0, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, 150d);
gcSpreadSheet1.Sheets[0].Rows[0].Background = new SolidColorBrush(Windows.UI.Colors.Gray);
gcSpreadSheet1.Sheets[0].Columns[0].Background = new SolidColorBrush(Windows.UI.Colors.Brown);
gcSpreadSheet1.Sheets(0).SetValue(0, 0, "value")
gcSpreadSheet1.Sheets(0).AddRows(0, 2)
gcSpreadSheet1.Sheets(0).AddColumns(0, 2)
gcSpreadSheet1.Sheets(0).SetRowHeight(0, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, 50.0)
gcSpreadSheet1.Sheets(0).SetColumnWidth(0, GrapeCity.Xaml.SpreadSheet.Data.SheetArea.Cells, 150.0)
gcSpreadSheet1.Sheets(0).Rows(0).Background = New SolidColorBrush(Windows.UI.Colors.Gray)
gcSpreadSheet1.Sheets(0).Columns(0).Background = New SolidColorBrush(Windows.UI.Colors.Brown)
Requirements

Target Platforms: Windows Server 2012, Windows RT

See Also

Reference

Worksheet Class
Worksheet Members

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options