DataSourceImportOptions Class
Allows you to specify data source fields to import.
Namespace: DevExpress.Spreadsheet
Assembly:
DevExpress.Spreadsheet.v24.2.Core.dll
NuGet Package:
DevExpress.Spreadsheet.Core
Declaration
public class DataSourceImportOptions :
DataImportOptions
Public Class DataSourceImportOptions
Inherits DataImportOptions
When calling the WorksheetExtensions.Import method, create the DataSourceImportOptions instance and use the DataSourceImportOptions.PropertyNames property to specify field names which should be imported form the data source.
Example
View Example
Friend Class TestObject
Public Sub New(ByVal intValue As Integer, ByVal value As String, ByVal boolValue As Boolean)
Me.intValue_Renamed = intValue
Me.Value = value
Me.BoolValue = boolValue
End Sub
Public intValue_Renamed As Integer
Private ReadOnly Property privateValue() As Integer
Get
Return 123
End Get
End Property
Public ReadOnly Property IntValue() As Integer
Get
Return intValue_Renamed + privateValue - 123
End Get
End Property
Public Property Value() As String
Public Property BoolValue() As Boolean
Default Public ReadOnly Property Item(ByVal index As Integer) As Integer
Get
Return index
End Get
End Property
End Class
class TestObject
{
public TestObject(int intValue, string value, bool boolValue)
{
this.intValue = intValue;
this.Value = value;
this.BoolValue = boolValue;
}
public int intValue;
private int privateValue { get { return 123; } }
public int IntValue { get { return intValue + privateValue - 123; } }
public string Value { get; set; }
public bool BoolValue { get; set; }
public int this[int index] { get { return index; } }
}
See Also