GridCell.GetStyle

GridCell.GetStyle method

Gets cell style. When change the style,you should invoke “SetStyle” method, to set style to cell.

public Style GetStyle()

Return Value

return copy of cell style.

Examples

[C#]
Style style = sheet.GetCell(0, 0).GetStyle();
style.CellLocked = true;
style.VAlignment = VerticalAlignmentType.Top;
...
sheet.GetCell(0, 0).SetStyle(style);

[Visual Basic]
Dim style As Style =  sheet.GetCell(0,0).GetStyle() 
style.CellLocked = True
style.VAlignment = VerticalAlignmentType.Top
...
sheet.GetCell(0, 0).SetStyle(style)

See Also