TXTextControl.Web.TextControl.LoadDataFromModel Method

Loads a collection implementing interface System.Collections.IEnumerable as a data source.

Introduced: 24.0.

LoadDataFromModel(IEnumerable)

Interprets all public properties of the objects in the collection as possible table columns and / or child tables. The type of the first object in the collection is analyzed via .NET reflection and used as the basis of the assumed table structure. For more information about using object based data sources see DocumentServer.MailMerge.MergeObjects. The method returns immediately.

[C#]
public void LoadDataFromModel(System.Collections.IEnumerable model);
[Visual Basic]
Public Sub LoadDataFromModel(model As System.Collections.IEnumerable)
Parameter Description
model

Specifies a System.Collections.IEnumerable that contains the merge data.

LoadDataFromModel(IEnumerable, IFormatProvider)

Allows to additionally specify a format which should be applied when converting date / time values and numerical values to strings.

[C#]
public void LoadDataFromModel(System.Collections.IEnumerable model, System.IFormatProvider numberAndDateTimeFormat);
[Visual Basic]
Public Sub LoadDataFromModel(model As System.Collections.IEnumerable, numberAndDateTimeFormat As System.IFormatProvider)
Parameter Description
model

Specifies a System.Collections.IEnumerable that contains the merge data.

numberAndDateTimeFormat

The format which should be applied when converting date / time values and numerical values to strings.

See Also