From e2eb5a81615033e2eb60754f700f2eb1bd6b4777 Mon Sep 17 00:00:00 2001 From: SanthanalakshmiSF4847 Date: Fri, 24 Oct 2025 10:35:09 +0530 Subject: [PATCH 1/6] 987773: Add UG contents for rows, columns, and wrap text --- Document-Processing-toc.html | 1 + .../Excel/Spreadsheet/Blazor/cell-range.md | 2 +- .../Spreadsheet/Blazor/rows-and-columns.md | 170 ++++++++++++++++++ 3 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 Document-Processing/Excel/Spreadsheet/Blazor/rows-and-columns.md diff --git a/Document-Processing-toc.html b/Document-Processing-toc.html index 3d17d1252..6645e8766 100644 --- a/Document-Processing-toc.html +++ b/Document-Processing-toc.html @@ -4818,6 +4818,7 @@
  • Editing
  • Formulas
  • Context Menu
  • +
  • Row and Columns
  • Filtering
  • Sorting
  • Hyperlink
  • diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md b/Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md index 221fddb91..93853bcc8 100644 --- a/Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md +++ b/Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md @@ -43,7 +43,7 @@ Cell formatting options include: * **Middle** – Centers content vertically * **Bottom** – Default alignment -* **Wrap Text** - Displays long content on multiple lines within a single cell, preventing it from overflowing into adjacent cells. +* **Wrap Text** - Displays long content on multiple lines within a single cell, preventing it from overflowing into adjacent cells. To apply this feature, select the target cell or range (e.g., C5), then go to the Home tab and click Wrap Text in the ribbon to toggle wrapping for the selection. 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. diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/rows-and-columns.md b/Document-Processing/Excel/Spreadsheet/Blazor/rows-and-columns.md new file mode 100644 index 000000000..46a346e98 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/Blazor/rows-and-columns.md @@ -0,0 +1,170 @@ +--- +layout: post +title: Rows and columns in Blazor Spreadsheet component | Syncfusion +description: Learn here all about Rows and columns in the Blazor Spreadsheet component and more. +platform: document-processing +control: Spreadsheet +documentation: ug +--- + +# Rows and columns in Blazor Spreadsheet component + +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, + +* Insert +* Setting Column and Row Count + +## Insert + +You can insert rows or columns anywhere in a spreadsheet. + +### Row + +The rows can be inserted in the following ways: + +**Using the context menu** + + Insert rows in the desired position by right-clicking on a row header. + +**Using `InsertRowAsync` method** + +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. + +The following code example shows the options for inserting rows in the spreadsheet. + +{% tabs %} +{% highlight razor tabtitle="Index.razor" %} + +@using Syncfusion.Blazor.Spreadsheet +@using Syncfusion.Blazor.Buttons + + + + + + +@code { + public byte[] DataSourceBytes { get; set; } + public SfSpreadsheet SpreadsheetInstance; + + protected override void OnInitialized() + { + string filePath = "wwwroot/Sample.xlsx"; + DataSourceBytes = File.ReadAllBytes(filePath); + } + + public async Task InsertRowsHandler() + { + // Insert 2 rows above row index 0 in the active sheet + await SpreadsheetInstance.InsertRowAsync(0, 2); + + // Insert 3 rows below row index 2 in the sheet named "Sheet2" + await SpreadsheetInstance.InsertRowAsync(2, 3, "Sheet2", RowPosition.Below); + + // Insert 1 row above row index 1 in the active sheet + await SpreadsheetInstance.InsertRowAsync(1, 1, null, RowPosition.Above); + + // Insert 4 rows below row index 3 in the sheet at index 3 + await SpreadsheetInstance.InsertRowAsync(3, 4, 3, RowPosition.Below); + } +} + +{% endhighlight %} +{% endtabs %} + +### Column + +The columns can be inserted in the following ways: + +**Using the context menu** + +Insert columns in the desired position by right-clicking on a column header. + +**Using `InsertColumnAsync` method** + +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. + +The following code example shows the options for inserting columns in the spreadsheet. + +{% tabs %} +{% highlight razor tabtitle="Index.razor" %} + +@using Syncfusion.Blazor.Spreadsheet +@using Syncfusion.Blazor.Buttons + + + + + + +@code { + public byte[] DataSourceBytes { get; set; } + public SfSpreadsheet SpreadsheetInstance; + + protected override void OnInitialized() + { + string filePath = "wwwroot/Sample.xlsx"; + DataSourceBytes = File.ReadAllBytes(filePath); + } + + public async Task InsertColumnsHandler() + { + // Insert 2 columns to the right of column index 2 + await SpreadsheetInstance.InsertColumnAsync(2, 2); + + // Insert 3 columns to the left of column index 5 + await SpreadsheetInstance.InsertColumnAsync(5, 3, null, ColumnPosition.Left); + + // Insert 1 column to the right of column B in Sheet2 + await SpreadsheetInstance.InsertColumnAsync(1, 1, "Sheet2", ColumnPosition.Right); + + // Insert 4 columns to the left of column D in the sheet at index 3 + await SpreadsheetInstance.InsertColumnAsync(3, 4, 3, ColumnPosition.Left); + } +} + +{% endhighlight %} +{% endtabs %} + +## Setting Row and Column Count + +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. + +* The default `RowCount` is **1000**. +* The default `ColumnCount` is **200**. + +**Rendering Behavior** + +- **Without Data Source:** + + - When no data is bound to the spreadsheet, the sheet renders empty cells up to RowCount × ColCount. + +- **With Data Source (e.g., byte array or imported file):** + + - If the data source has fewer rows/columns than RowCount/ColCount, the spreadsheet renders additional empty rows/columns to meet the specified counts. + - 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. + + +You can set these properties as follows: + +{% tabs %} +{% highlight razor tabtitle="Index.razor" %} + +@using Syncfusion.Blazor.Spreadsheet + + + + + +@code { + public byte[] DataSourceBytes { get; set; } + + protected override void OnInitialized() + { + string filePath = "wwwroot/Sample.xlsx"; + DataSourceBytes = File.ReadAllBytes(filePath); + } +} + +{% endhighlight %} +{% endtabs %} \ No newline at end of file From 28a792bba58606072f5e7e94cc512b4dd86ba4ec Mon Sep 17 00:00:00 2001 From: SanthanalakshmiSF4847 Date: Fri, 24 Oct 2025 11:00:44 +0530 Subject: [PATCH 2/6] 987773: Resolved the CI failure --- .../Excel/Spreadsheet/Blazor/rows-and-columns.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/rows-and-columns.md b/Document-Processing/Excel/Spreadsheet/Blazor/rows-and-columns.md index 46a346e98..4efe8db8f 100644 --- a/Document-Processing/Excel/Spreadsheet/Blazor/rows-and-columns.md +++ b/Document-Processing/Excel/Spreadsheet/Blazor/rows-and-columns.md @@ -1,7 +1,7 @@ --- layout: post title: Rows and columns in Blazor Spreadsheet component | Syncfusion -description: Learn here all about Rows and columns in the Blazor Spreadsheet component and more. +description: Learn here all about Rows and columns in the Syncfusion Blazor Spreadsheet component and more. platform: document-processing control: Spreadsheet documentation: ug From d68de4aa07c1683b932a62f8ef2b93b93f84da5c Mon Sep 17 00:00:00 2001 From: SanthanalakshmiSF4847 Date: Fri, 24 Oct 2025 11:19:03 +0530 Subject: [PATCH 3/6] 987773: Resolve the CI failure --- .../Excel/Spreadsheet/Blazor/rows-and-columns.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/rows-and-columns.md b/Document-Processing/Excel/Spreadsheet/Blazor/rows-and-columns.md index 4efe8db8f..068d77351 100644 --- a/Document-Processing/Excel/Spreadsheet/Blazor/rows-and-columns.md +++ b/Document-Processing/Excel/Spreadsheet/Blazor/rows-and-columns.md @@ -1,7 +1,7 @@ --- layout: post title: Rows and columns in Blazor Spreadsheet component | Syncfusion -description: Learn here all about Rows and columns in the Syncfusion Blazor Spreadsheet component and more. +description: Checkout and learn here all about Rows and columns in the Syncfusion Blazor Spreadsheet component and more. platform: document-processing control: Spreadsheet documentation: ug From 0c0e75503ea6e84de2073dbb35ee2428aabbc336 Mon Sep 17 00:00:00 2001 From: SasthaPrathap <88700192+SasthaPrathap@users.noreply.github.com> Date: Fri, 24 Oct 2025 15:04:21 +0530 Subject: [PATCH 4/6] Update cell-range.md --- Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md b/Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md index 93853bcc8..fec807552 100644 --- a/Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md +++ b/Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md @@ -43,7 +43,10 @@ Cell formatting options include: * **Middle** – Centers content vertically * **Bottom** – Default alignment -* **Wrap Text** - Displays long content on multiple lines within a single cell, preventing it from overflowing into adjacent cells. To apply this feature, select the target cell or range (e.g., C5), then go to the Home tab and click Wrap Text in the ribbon to toggle wrapping for the selection. +* **Wrap Text** - Displays long content on multiple lines within a single cell, preventing it from overflowing into adjacent cells. To enable text wrapping: + 1. Select the target cell or range (e.g., C5). + 2. Go to the Home tab. + 3. Click Wrap Text in the ribbon to toggle text wrapping for the selected cells. 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. @@ -121,4 +124,4 @@ The clear support can be applied using the following way: The following image displays the clear options available in the Ribbon toolbar under the **Home** tab of the Blazor Spreadsheet. -![Clear options in the Blazor Spreadsheet](images/clear-feature.png) \ No newline at end of file +![Clear options in the Blazor Spreadsheet](images/clear-feature.png) From 176079858a6ab0856d8cf2afb8cb0285ddafea48 Mon Sep 17 00:00:00 2001 From: sameerkhan001 Date: Fri, 24 Oct 2025 16:35:38 +0530 Subject: [PATCH 5/6] 260184-ug: Added content for the Annotation Intent in the PDF freeText Annotation --- .../NET/Working-with-Annotations.md | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) diff --git a/Document-Processing/PDF/PDF-Library/NET/Working-with-Annotations.md b/Document-Processing/PDF/PDF-Library/NET/Working-with-Annotations.md index 9a436c64c..b2e8eae8d 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Working-with-Annotations.md +++ b/Document-Processing/PDF/PDF-Library/NET/Working-with-Annotations.md @@ -5068,6 +5068,141 @@ document.Close(True) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Annotation/Adding-transparency-for-annotations/.NET). +## Setting Annotation Intent in PdfFreeTextAnnotation + +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. + +{% tabs %} + +{% highlight c# tabtitle="C# [Cross-platform]" %} + +using Syncfusion.Drawing; +using Syncfusion.Pdf; +using Syncfusion.Pdf.Graphics; +using Syncfusion.Pdf.Interactive; + +// Create a new PDF document +using (PdfDocument document = new PdfDocument()) +{ + // Add a page + PdfPage page = document.Pages.Add(); + + // Define the bounds for the annotation + RectangleF bounds = new RectangleF(100, 100, 200, 50); + + // Create a FreeText annotation + PdfFreeTextAnnotation freeText = new PdfFreeTextAnnotation(bounds); + // Add content. + freeText.Text = "Add Free Text Annotation with Intent"; + // Set the annotation intent to TypeWriter + freeText.AnnotationIntent = PdfAnnotationIntent.FreeTextTypeWriter; + + // Customize appearance + freeText.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 12); + freeText.TextMarkupColor = Color.Black; + freeText.BorderColor = Color.Gray; + freeText.Color = Color.LightYellow; + + // Add the annotation to the page + page.Annotations.Add(freeText); + + // Save the document + document.Save("Output.pdf"); + + // Close the document + document.Close(true); +} + +{% endhighlight %} + +{% highlight c# tabtitle="C# [Windows-specific]" %} + +using Syncfusion.Drawing; +using Syncfusion.Pdf; +using Syncfusion.Pdf.Graphics; +using Syncfusion.Pdf.Interactive; + +// Create a new PDF document +using (PdfDocument document = new PdfDocument()) +{ + // Add a page + PdfPage page = document.Pages.Add(); + + // Define the bounds for the annotation + RectangleF bounds = new RectangleF(100, 100, 200, 50); + + // Create a FreeText annotation + PdfFreeTextAnnotation freeText = new PdfFreeTextAnnotation(bounds); + // Add content. + freeText.Text = "Add Free Text Annotation with Intent"; + // Set the annotation intent to TypeWriter + freeText.AnnotationIntent = PdfAnnotationIntent.FreeTextTypeWriter; + + // Customize appearance + freeText.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 12); + freeText.TextMarkupColor = Color.Black; + freeText.BorderColor = Color.Gray; + freeText.Color = Color.LightYellow; + + // Add the annotation to the page + page.Annotations.Add(freeText); + + // Save the document + document.Save("Output.pdf"); + + // Close the document + document.Close(true); +} + +{% endhighlight %} + +{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} + +Imports Syncfusion.Drawing +Imports Syncfusion.Pdf +Imports Syncfusion.Pdf.Graphics +Imports Syncfusion.Pdf.Interactive + +' Create a new PDF document +Using document As New PdfDocument() + + ' Add a page + Dim page As PdfPage = document.Pages.Add() + + ' Define the bounds for the annotation + Dim bounds As New RectangleF(100, 100, 200, 50) + + ' Create a FreeText annotation + Dim freeText As New PdfFreeTextAnnotation(bounds) + + ' Add content + freeText.Text = "Add Free Text Annotation with Intent" + + ' Set the annotation intent to TypeWriter + freeText.AnnotationIntent = PdfAnnotationIntent.FreeTextTypeWriter + + ' Customize appearance + freeText.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 12) + freeText.TextMarkupColor = Color.Black + freeText.BorderColor = Color.Gray + freeText.Color = Color.LightYellow + + ' Add the annotation to the page + page.Annotations.Add(freeText) + + ' Save the document + document.Save("Output.pdf") + + ' Close the document + document.Close(True) +End Using + +{% endhighlight %} + +{% endtabs %} + +You can download a complete working sample from GitHub. + ## Adding comments and review status to the PDF annotation 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)). From 2a3c57422b1c8e3ff0d487d1150dec224a6819d2 Mon Sep 17 00:00:00 2001 From: sameerkhan001 Date: Fri, 24 Oct 2025 17:59:19 +0530 Subject: [PATCH 6/6] 260184-ug: Removed unwanted changes. --- .../PDF/PDF-Library/NET/Working-with-Annotations.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Document-Processing/PDF/PDF-Library/NET/Working-with-Annotations.md b/Document-Processing/PDF/PDF-Library/NET/Working-with-Annotations.md index b2e8eae8d..ca56ac094 100644 --- a/Document-Processing/PDF/PDF-Library/NET/Working-with-Annotations.md +++ b/Document-Processing/PDF/PDF-Library/NET/Working-with-Annotations.md @@ -5108,9 +5108,6 @@ using (PdfDocument document = new PdfDocument()) // Save the document document.Save("Output.pdf"); - - // Close the document - document.Close(true); } {% endhighlight %} @@ -5149,9 +5146,6 @@ using (PdfDocument document = new PdfDocument()) // Save the document document.Save("Output.pdf"); - - // Close the document - document.Close(true); } {% endhighlight %} @@ -5192,9 +5186,6 @@ Using document As New PdfDocument() ' Save the document document.Save("Output.pdf") - - ' Close the document - document.Close(True) End Using {% endhighlight %}