Skip to content

73fbd426 4655 82f4 8e2d aee272c1e63b

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

GroupModel.Name Property

Additional header content

Gets or sets the name of the group.

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 Name { get; set; }

VB

Public Property Name As String
	Get
	Set

Property Value

Type: String
The name of the group. Are only allow strings made ​​up of letters, numbers and following special chars '_ - # * @ % $'.

Exceptions

 

Exception Condition
ArgumentNullException If value is null.
InvalidFieldIdentifierNameException If value not is a valid field identifier name.

Remarks

ITEE Object Element Usage

<Group Name="string">
  ...
</Group>

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 creates a new group called AddressGroup as a result of the union of three fields. 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

GroupModel Class
iTin.Export.Model Namespace

Clone this wiki locally