corelibraries-devexpress-dot-dataaccess-dot-excel-dot-fieldinfolist-dot-addrange-x28-devexpress-dot-dataaccess-dot-excel-dot-fieldinfo-x29.md
Appends an array of FieldInfo objects to the current FieldInfoList.
Namespace : DevExpress.DataAccess.Excel
Assembly : DevExpress.DataAccess.v25.2.dll
NuGet Package : DevExpress.DataAccess
public void AddRange(
FieldInfo[] collection
)
Public Sub AddRange(
collection As FieldInfo()
)
| Name | Type | Description |
|---|---|---|
| collection | FieldInfo[] |
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
// 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
excelDS.Schema.AddRange(new DevExpress.DataAccess.Excel.FieldInfo[] {
fieldInfo1,
reporting-winforms-bind-to-csv-file/VB/BindingReportToCsvFile/Form1.vb#L29
' 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
' 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
excelDS.Schema.AddRange(New DevExpress.DataAccess.Excel.FieldInfo() { fieldInfo1, fieldInfo2, fieldInfo3 })
excelDS.RebuildResultSchema()
See Also