Skip to content

Commit 335888a

Browse files
Merge pull request #337 from SyncfusionExamples/901974-Code-changes
ES-901974- Modify cell format sample
2 parents 52cab57 + 2ef5d16 commit 335888a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Binary file not shown.

Tables/Apply-cell-formatting/.NET/Apply-cell-formatting/Program.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,13 @@ static void Main(string[] args)
3737
cell.CellFormat.VerticalAlignment = VerticalAlignment.Middle;
3838
//Disables the text wrap option to avoid displaying longer text on multiple lines.
3939
cell.CellFormat.TextWrap = false;
40-
//Sets the text direction for cell.
41-
cell.CellFormat.TextDirection = TextDirection.VerticalBottomToTop;
40+
// Set text direction for each cell in a row
41+
row.Cells[0].CellFormat.TextDirection = TextDirection.Vertical;
42+
row.Cells[1].CellFormat.TextDirection = TextDirection.VerticalBottomToTop;
43+
row.Cells[2].CellFormat.TextDirection = TextDirection.VerticalTopToBottom;
44+
row.Cells[3].CellFormat.TextDirection = TextDirection.VerticalFarEast;
45+
row.Cells[4].CellFormat.TextDirection = TextDirection.HorizontalFarEast;
46+
row.Cells[5].CellFormat.TextDirection = TextDirection.Horizontal;
4247
//Accesses the instance of the second cell in the row.
4348
cell = row.Cells[1];
4449
cell.CellFormat.BackColor = Color.FromArgb(192, 192, 192);

0 commit comments

Comments
 (0)