Skip to content

Commit b1230de

Browse files
Merge pull request #1633 from Syncfusion-Content/hotfix/hotfix-v31.2.2
DOCINFRA-2341_merged_using_automation
2 parents 34655b4 + d5af16c commit b1230de

File tree

4 files changed

+302
-2
lines changed

4 files changed

+302
-2
lines changed

Document-Processing-toc.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4818,6 +4818,7 @@
48184818
<li><a href="/document-processing/excel/spreadsheet/blazor/editing">Editing</a></li>
48194819
<li><a href="/document-processing/excel/spreadsheet/blazor/formulas">Formulas</a></li>
48204820
<li><a href="/document-processing/excel/spreadsheet/blazor/contextmenu">Context Menu</a></li>
4821+
<li><a href="/document-processing/excel/spreadsheet/blazor/rows-and-columns">Row and Columns</a></li>
48214822
<li><a href="/document-processing/excel/spreadsheet/blazor/filtering">Filtering</a></li>
48224823
<li><a href="/document-processing/excel/spreadsheet/blazor/sorting">Sorting</a></li>
48234824
<li><a href="/document-processing/excel/spreadsheet/blazor/hyperlink">Hyperlink</a></li>

Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ Cell formatting options include:
4343
* **Middle** – Centers content vertically
4444
* **Bottom** – Default alignment
4545

46-
* **Wrap Text** - Displays long content on multiple lines within a single cell, preventing it from overflowing into adjacent cells.
46+
* **Wrap Text** - Displays long content on multiple lines within a single cell, preventing it from overflowing into adjacent cells. To enable text wrapping:
47+
1. Select the target cell or range (e.g., C5).
48+
2. Go to the Home tab.
49+
3. Click Wrap Text in the ribbon to toggle text wrapping for the selected cells.
4750

4851
Cell formatting can be applied to or removed from a cell or range of cells by using the formatting options available in the Ribbon toolbar under the **Home** tab.
4952

@@ -121,4 +124,4 @@ The clear support can be applied using the following way:
121124

122125
The following image displays the clear options available in the Ribbon toolbar under the **Home** tab of the Blazor Spreadsheet.
123126

124-
![Clear options in the Blazor Spreadsheet](images/clear-feature.png)
127+
![Clear options in the Blazor Spreadsheet](images/clear-feature.png)
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
---
2+
layout: post
3+
title: Rows and columns in Blazor Spreadsheet component | Syncfusion
4+
description: Checkout and learn here all about Rows and columns in the Syncfusion Blazor Spreadsheet component and more.
5+
platform: document-processing
6+
control: Spreadsheet
7+
documentation: ug
8+
---
9+
10+
# Rows and columns in Blazor Spreadsheet component
11+
12+
Spreadsheet is a tabular format consisting of rows and columns. The intersection point of rows and columns are called as cells. The list of operations that you can perform in rows and columns are,
13+
14+
* Insert
15+
* Setting Column and Row Count
16+
17+
## Insert
18+
19+
You can insert rows or columns anywhere in a spreadsheet.
20+
21+
### Row
22+
23+
The rows can be inserted in the following ways:
24+
25+
**Using the context menu**
26+
27+
Insert rows in the desired position by right-clicking on a row header.
28+
29+
**Using `InsertRowAsync` method**
30+
31+
Using [`InsertRowAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_InsertRowAsync_System_Int32_System_Int32_System_Object_Syncfusion_Blazor_Spreadsheet_RowPosition_) method, you can insert the rows once the component is loaded.
32+
33+
The following code example shows the options for inserting rows in the spreadsheet.
34+
35+
{% tabs %}
36+
{% highlight razor tabtitle="Index.razor" %}
37+
38+
@using Syncfusion.Blazor.Spreadsheet
39+
@using Syncfusion.Blazor.Buttons
40+
41+
<SfButton OnClick="InsertRowsHandler" Content="Insert Rows"></SfButton>
42+
<SfSpreadsheet @ref="@SpreadsheetInstance" DataSource="DataSourceBytes">
43+
<SpreadsheetRibbon></SpreadsheetRibbon>
44+
</SfSpreadsheet>
45+
46+
@code {
47+
public byte[] DataSourceBytes { get; set; }
48+
public SfSpreadsheet SpreadsheetInstance;
49+
50+
protected override void OnInitialized()
51+
{
52+
string filePath = "wwwroot/Sample.xlsx";
53+
DataSourceBytes = File.ReadAllBytes(filePath);
54+
}
55+
56+
public async Task InsertRowsHandler()
57+
{
58+
// Insert 2 rows above row index 0 in the active sheet
59+
await SpreadsheetInstance.InsertRowAsync(0, 2);
60+
61+
// Insert 3 rows below row index 2 in the sheet named "Sheet2"
62+
await SpreadsheetInstance.InsertRowAsync(2, 3, "Sheet2", RowPosition.Below);
63+
64+
// Insert 1 row above row index 1 in the active sheet
65+
await SpreadsheetInstance.InsertRowAsync(1, 1, null, RowPosition.Above);
66+
67+
// Insert 4 rows below row index 3 in the sheet at index 3
68+
await SpreadsheetInstance.InsertRowAsync(3, 4, 3, RowPosition.Below);
69+
}
70+
}
71+
72+
{% endhighlight %}
73+
{% endtabs %}
74+
75+
### Column
76+
77+
The columns can be inserted in the following ways:
78+
79+
**Using the context menu**
80+
81+
Insert columns in the desired position by right-clicking on a column header.
82+
83+
**Using `InsertColumnAsync` method**
84+
85+
Using [`InsertColumnAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_InsertColumnAsync_System_Int32_System_Int32_System_Object_Syncfusion_Blazor_Spreadsheet_ColumnPosition_) method, you can insert the columns once the component is loaded.
86+
87+
The following code example shows the options for inserting columns in the spreadsheet.
88+
89+
{% tabs %}
90+
{% highlight razor tabtitle="Index.razor" %}
91+
92+
@using Syncfusion.Blazor.Spreadsheet
93+
@using Syncfusion.Blazor.Buttons
94+
95+
<SfButton OnClick="InsertColumnsHandler" Content="Insert Columns"></SfButton>
96+
<SfSpreadsheet @ref="@SpreadsheetInstance" DataSource="DataSourceBytes">
97+
<SpreadsheetRibbon></SpreadsheetRibbon>
98+
</SfSpreadsheet>
99+
100+
@code {
101+
public byte[] DataSourceBytes { get; set; }
102+
public SfSpreadsheet SpreadsheetInstance;
103+
104+
protected override void OnInitialized()
105+
{
106+
string filePath = "wwwroot/Sample.xlsx";
107+
DataSourceBytes = File.ReadAllBytes(filePath);
108+
}
109+
110+
public async Task InsertColumnsHandler()
111+
{
112+
// Insert 2 columns to the right of column index 2
113+
await SpreadsheetInstance.InsertColumnAsync(2, 2);
114+
115+
// Insert 3 columns to the left of column index 5
116+
await SpreadsheetInstance.InsertColumnAsync(5, 3, null, ColumnPosition.Left);
117+
118+
// Insert 1 column to the right of column B in Sheet2
119+
await SpreadsheetInstance.InsertColumnAsync(1, 1, "Sheet2", ColumnPosition.Right);
120+
121+
// Insert 4 columns to the left of column D in the sheet at index 3
122+
await SpreadsheetInstance.InsertColumnAsync(3, 4, 3, ColumnPosition.Left);
123+
}
124+
}
125+
126+
{% endhighlight %}
127+
{% endtabs %}
128+
129+
## Setting Row and Column Count
130+
131+
The Blazor Spreadsheet component enables you to define the initial number of rows and columns using the [`RowCount`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_RowCount) and [`ColumnCount`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_ColumnCount) properties.
132+
133+
* The default `RowCount` is **1000**.
134+
* The default `ColumnCount` is **200**.
135+
136+
**Rendering Behavior**
137+
138+
- **Without Data Source:**
139+
140+
- When no data is bound to the spreadsheet, the sheet renders empty cells up to RowCount × ColCount.
141+
142+
- **With Data Source (e.g., byte array or imported file):**
143+
144+
- If the data source has fewer rows/columns than RowCount/ColCount, the spreadsheet renders additional empty rows/columns to meet the specified counts.
145+
- If the data source has more rows/columns than RowCount/ColCount, the spreadsheet renders enough rows/columns to display all data from the source (i.e., it extends beyond the specified counts to fit the data). Your data is never truncated by these properties.
146+
147+
148+
You can set these properties as follows:
149+
150+
{% tabs %}
151+
{% highlight razor tabtitle="Index.razor" %}
152+
153+
@using Syncfusion.Blazor.Spreadsheet
154+
155+
<SfSpreadsheet DataSource="DataSourceBytes" RowCount="1200" ColumnCount="300" >
156+
<SpreadsheetRibbon></SpreadsheetRibbon>
157+
</SfSpreadsheet>
158+
159+
@code {
160+
public byte[] DataSourceBytes { get; set; }
161+
162+
protected override void OnInitialized()
163+
{
164+
string filePath = "wwwroot/Sample.xlsx";
165+
DataSourceBytes = File.ReadAllBytes(filePath);
166+
}
167+
}
168+
169+
{% endhighlight %}
170+
{% endtabs %}

Document-Processing/PDF/PDF-Library/NET/Working-with-Annotations.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5068,6 +5068,132 @@ document.Close(True)
50685068

50695069
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Annotation/Adding-transparency-for-annotations/.NET).
50705070

5071+
## Setting Annotation Intent in PdfFreeTextAnnotation
5072+
5073+
The [PdfAnnotationIntent.FreeTextTypeWriter](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Interactive.PdfAnnotationIntent.html#fields) value specifies that a `free text annotation` in a PDF should behave like a `typewriter-style input field`. This intent is especially useful for simulating manual typing on forms or documents, enabling users to add clear, typed comments or responses.
5074+
5075+
{% tabs %}
5076+
5077+
{% highlight c# tabtitle="C# [Cross-platform]" %}
5078+
5079+
using Syncfusion.Drawing;
5080+
using Syncfusion.Pdf;
5081+
using Syncfusion.Pdf.Graphics;
5082+
using Syncfusion.Pdf.Interactive;
5083+
5084+
// Create a new PDF document
5085+
using (PdfDocument document = new PdfDocument())
5086+
{
5087+
// Add a page
5088+
PdfPage page = document.Pages.Add();
5089+
5090+
// Define the bounds for the annotation
5091+
RectangleF bounds = new RectangleF(100, 100, 200, 50);
5092+
5093+
// Create a FreeText annotation
5094+
PdfFreeTextAnnotation freeText = new PdfFreeTextAnnotation(bounds);
5095+
// Add content.
5096+
freeText.Text = "Add Free Text Annotation with Intent";
5097+
// Set the annotation intent to TypeWriter
5098+
freeText.AnnotationIntent = PdfAnnotationIntent.FreeTextTypeWriter;
5099+
5100+
// Customize appearance
5101+
freeText.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 12);
5102+
freeText.TextMarkupColor = Color.Black;
5103+
freeText.BorderColor = Color.Gray;
5104+
freeText.Color = Color.LightYellow;
5105+
5106+
// Add the annotation to the page
5107+
page.Annotations.Add(freeText);
5108+
5109+
// Save the document
5110+
document.Save("Output.pdf");
5111+
}
5112+
5113+
{% endhighlight %}
5114+
5115+
{% highlight c# tabtitle="C# [Windows-specific]" %}
5116+
5117+
using Syncfusion.Drawing;
5118+
using Syncfusion.Pdf;
5119+
using Syncfusion.Pdf.Graphics;
5120+
using Syncfusion.Pdf.Interactive;
5121+
5122+
// Create a new PDF document
5123+
using (PdfDocument document = new PdfDocument())
5124+
{
5125+
// Add a page
5126+
PdfPage page = document.Pages.Add();
5127+
5128+
// Define the bounds for the annotation
5129+
RectangleF bounds = new RectangleF(100, 100, 200, 50);
5130+
5131+
// Create a FreeText annotation
5132+
PdfFreeTextAnnotation freeText = new PdfFreeTextAnnotation(bounds);
5133+
// Add content.
5134+
freeText.Text = "Add Free Text Annotation with Intent";
5135+
// Set the annotation intent to TypeWriter
5136+
freeText.AnnotationIntent = PdfAnnotationIntent.FreeTextTypeWriter;
5137+
5138+
// Customize appearance
5139+
freeText.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 12);
5140+
freeText.TextMarkupColor = Color.Black;
5141+
freeText.BorderColor = Color.Gray;
5142+
freeText.Color = Color.LightYellow;
5143+
5144+
// Add the annotation to the page
5145+
page.Annotations.Add(freeText);
5146+
5147+
// Save the document
5148+
document.Save("Output.pdf");
5149+
}
5150+
5151+
{% endhighlight %}
5152+
5153+
{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
5154+
5155+
Imports Syncfusion.Drawing
5156+
Imports Syncfusion.Pdf
5157+
Imports Syncfusion.Pdf.Graphics
5158+
Imports Syncfusion.Pdf.Interactive
5159+
5160+
' Create a new PDF document
5161+
Using document As New PdfDocument()
5162+
5163+
' Add a page
5164+
Dim page As PdfPage = document.Pages.Add()
5165+
5166+
' Define the bounds for the annotation
5167+
Dim bounds As New RectangleF(100, 100, 200, 50)
5168+
5169+
' Create a FreeText annotation
5170+
Dim freeText As New PdfFreeTextAnnotation(bounds)
5171+
5172+
' Add content
5173+
freeText.Text = "Add Free Text Annotation with Intent"
5174+
5175+
' Set the annotation intent to TypeWriter
5176+
freeText.AnnotationIntent = PdfAnnotationIntent.FreeTextTypeWriter
5177+
5178+
' Customize appearance
5179+
freeText.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 12)
5180+
freeText.TextMarkupColor = Color.Black
5181+
freeText.BorderColor = Color.Gray
5182+
freeText.Color = Color.LightYellow
5183+
5184+
' Add the annotation to the page
5185+
page.Annotations.Add(freeText)
5186+
5187+
' Save the document
5188+
document.Save("Output.pdf")
5189+
End Using
5190+
5191+
{% endhighlight %}
5192+
5193+
{% endtabs %}
5194+
5195+
You can download a complete working sample from GitHub.
5196+
50715197
## Adding comments and review status to the PDF annotation
50725198

50735199
The PDF annotations may have an author-specific state associated with them. The state is not specified in the annotation itself, but it represents a separate text annotation ([Popup Annotation](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Interactive.PdfPopupAnnotation.html)).

0 commit comments

Comments
 (0)