Public Member Functions | Properties
Field Class Reference

Represents a single field of the attribute table. More...

List of all members.

Public Member Functions

Field Clone ()
 Creates an exact copy of the field.
string get_ErrorMsg (int ErrorCode)
 Retrieves the error message associated with the specified error code.

Properties

string Alias [get, set]
 Gets or sets the alias for the field. For use in application only, not used by MapWinGIS internally.
string Expression [get, set]
 Gets or sets the expression for the field. For use in application only, not used by MapWinGIS internally.
ICallback GlobalCallback [get, set]
 The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
bool Joined [get, set]
 Gets a value indicating whether this field is joined.
string Key [get, set]
 The key may be used by the programmer to store any string data associated with the object.
int LastErrorCode [get]
 Retrieves the last error generated in the object.
bool Modified [get, set]
 Gets or sets a value indicating whether this field is modified. It is used during saving of changes for OgrLayer. The flag should be set by application code.
string Name [get, set]
 Gets or sets the name of the field.
int Precision [get, set]
 Gets or sets the precision of the field. Precision only applies to fields of fieldtype double.
FieldType Type [get, set]
 Gets or sets the field type of the field.
bool Visible [get, set]
 Gets or sets a value indicating whether the field is visible. For use in application only, not used by MapWinGIS internally.
int Width [get, set]
 Gets or sets the width of the field.

Detailed Description

Represents a single field of the attribute table.

dot_inline_dotgraph_39.png

Graph description

To show the properties of the field the following code can be used:

 Shapefile sf = some_shapefile;
 Field field = sf.get_Field(fieldIndex);
 if (field != null)
 {
     string s = string.Format("Name = {0}; type = {1}; width = {2}; precision = {3}", 
     field.Name, field.Type.ToString(), field.Width.ToString(), field.Precision.ToString());
     Debug.Print(s);
 }
Examples:
IntersectionLength.cs, and MinimalDistance.cs.

Member Function Documentation

Creates an exact copy of the field.

Returns:
The copy of the field.
New API 4.8:
Added in version 4.8
string Field.get_ErrorMsg ( int  ErrorCode)

Retrieves the error message associated with the specified error code.

Parameters:
ErrorCodeThe error code for which the error message is required.
Returns:
The error message description for the specified error code.

Property Documentation

string Field.Alias [get, set]

Gets or sets the alias for the field. For use in application only, not used by MapWinGIS internally.

New API 4.9.4:
Added in version 4.9.4
string Field.Expression [get, set]

Gets or sets the expression for the field. For use in application only, not used by MapWinGIS internally.

New API 4.9.4:
Added in version 4.9.4

The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.

Deprecated:
v4.9.3 Use GlobalSettings.ApplicationCallback instead.
bool Field.Joined [get, set]

Gets a value indicating whether this field is joined.

New API 4.9.4:
Added in version 4.9.4
string Field.Key [get, set]

The key may be used by the programmer to store any string data associated with the object.

Retrieves the last error generated in the object.

bool Field.Modified [get, set]

Gets or sets a value indicating whether this field is modified. It is used during saving of changes for OgrLayer. The flag should be set by application code.

New API 4.9.4:
Added in version 4.9.4
string Field.Name [get, set]

Gets or sets the name of the field.

Examples:
MinimalDistance.cs.
int Field.Precision [get, set]

Gets or sets the precision of the field. Precision only applies to fields of fieldtype double.

Examples:
MinimalDistance.cs.
FieldType Field.Type [get, set]

Gets or sets the field type of the field.

Examples:
MinimalDistance.cs.
bool Field.Visible [get, set]

Gets or sets a value indicating whether the field is visible. For use in application only, not used by MapWinGIS internally.

New API 4.9.4:
Added in version 4.9.4
int Field.Width [get, set]

Gets or sets the width of the field.

 All Classes Files Functions Enumerations Properties Events