Back to Devexpress

FieldInfoList.AddRange(FieldInfo[]) Method

corelibraries-devexpress-dot-dataaccess-dot-excel-dot-fieldinfolist-dot-addrange-x28-devexpress-dot-dataaccess-dot-excel-dot-fieldinfo-x29.md

latest4.2 KB
Original Source

FieldInfoList.AddRange(FieldInfo[]) Method

Appends an array of FieldInfo objects to the current FieldInfoList.

Namespace : DevExpress.DataAccess.Excel

Assembly : DevExpress.DataAccess.v25.2.dll

NuGet Package : DevExpress.DataAccess

Declaration

csharp
public void AddRange(
    FieldInfo[] collection
)
vb
Public Sub AddRange(
    collection As FieldInfo()
)

Parameters

NameTypeDescription
collectionFieldInfo[]

An array of FieldInfo objects to be added to the collection.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the AddRange(FieldInfo[]) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

reporting-winforms-bind-to-csv-file/CS/BindingReportToCsvFile/Form1.cs#L38

csharp
// Add the created fields to the data source schema in the order that matches the column order in the source file.
excelDataSource.Schema.AddRange(new FieldInfo[] { fieldCategoryID, fieldCategoryName, fieldDescription });

reporting-web-forms-report-designer-add-data-sources/CS/WebApplication1/Default.aspx.cs#L51

csharp
excelDS.Schema.AddRange(new DevExpress.DataAccess.Excel.FieldInfo[] {
            fieldInfo1,

reporting-winforms-bind-to-csv-file/VB/BindingReportToCsvFile/Form1.vb#L29

vb
' Add the created fields to the data source schema in the order that matches the column order in the source file.
excelDataSource.Schema.AddRange(New FieldInfo() {fieldCategoryID, fieldCategoryName, fieldDescription})
' Assign the data source to the report.

reporting-winforms-bind-excel-runtime/VB/BindingReportToExcelWorkbook/Form1.vb#L37

vb
' Add the created fields to the data source schema in the order that matches the column order in the source file.
excelDataSource.Schema.AddRange(New FieldInfo() {fieldCategoryID, fieldCategoryName, fieldDescription})
' Assign the data source to the report.

reporting-web-forms-report-designer-add-data-sources/VB/WebApplication1/Default.aspx.vb#L50

vb
excelDS.Schema.AddRange(New DevExpress.DataAccess.Excel.FieldInfo() { fieldInfo1, fieldInfo2, fieldInfo3 })
excelDS.RebuildResultSchema()

See Also

FieldInfoList Class

FieldInfoList Members

DevExpress.DataAccess.Excel Namespace