Skip to content

06d33a91 e1eb 96bb e550 89e5f03dd424

Fernando Garcia edited this page May 8, 2018 · 1 revision

GroupItemModel.Separator Property

Additional header content

Gets or sets the field separator.

Namespace: iTin.Export.Model
Assembly: iTin.Export.Core (in iTin.Export.Core.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

public string Separator { get; set; }

VB

Public Property Separator As String
	Get
	Set

Property Value

Type: String
The field separator. The default is "None".

Remarks

ITEE Object Element Usage

<Field Separator="None|Space|Slash|Backslash|Dash|Dot|Comma|Colon|Semi Colon|New Line|string" .../>

AEE recognizes the following strings as valid separators:  

Value Description
None An empty string
Space A whitespace
Dash -
Dot .
Comma ,
Colon :
Semi Colon ;
New Line A new line
Other value Defined by user
   
Note Note
AEE provides the KnownItemGroupSeparator static class, it contains list of constants with the known elements, can be used for compare values if necessary for new writers.
  Compatibility table with native writers.
Comma-Separated Values
CsvWriter
Tab-Separated Values
TsvWriter
SQL Script
SqlScriptWriter
XML Spreadsheet 2003
Spreadsheet2003TabularWriter
X X X X
A X value indicates that the writer supports this element.

Examples

The following example shows the use of the property. The new group consists of three fields separated by commas. XML

<Groups>     
  <Group Name="AddressGroup">
    <Field Name="CMADR1" Separator="Comma"/>
    <Field Name="CMCITY" Separator="Comma"/>
    <Field Name="CMPSTAL"/>
  </Group>
</Groups>

C#

public void CreateGroup()
{
    GroupsModel groups = new GroupsModel();

    GroupModel addressGroup = new GroupModel
                                  { 
                                      Name = "AddressGroup",
                                      Fields = new List<GroupItemModel>
                                                   {
                                                       new GroupItemModel { Name = "CMADR1", Separator = "Comma" },
                                                       new GroupItemModel { Name = "CMCITY", Separator = "Comma" },
                                                       new GroupItemModel { Name = "CMPSTAL" }
                                                   }
                                  };
    addressGroup.SetOwner(groups);
    groups.Items.Add(addressGroup);

    ExportModel export = new ExportModel 
                             {
                                 Table = 
                                     {
                                         Name = "Sample",
                                         Alias = "New table",
                                         Location = new[] { 2, 2}, 
                                         Groups = groups
                                     } 
                             };

    ExportsModel model = new ExportsModel();
    model.Items.Add(export);
}

See Also

Reference

GroupItemModel Class
iTin.Export.Model Namespace

Clone this wiki locally