Skip to content

CustomColumnFetchEventArgs

Namespace: ThinkGeo.Core

This class represents the parameters passed in through the CustomFieldFetch event.

public class CustomColumnFetchEventArgs : System.EventArgs

Inheritance objectEventArgsCustomColumnFetchEventArgs

Remarks:

CustomColumnFetch Event Background

This event is used primarily when you have data relating to a particular feature or set of features that is not within source of the data. For example, you may have a shape file of the world whose .dbf component describes the area and population of each country. Additionally, in an outside SQL Server table, you may also have data about the countries, and it is this data that you wish to use for determining how you want to color each country.
To integrate this SQL data, you simply create a file name that does not exist in the .dbf file. Whenever Map Suite is queried to return records that specifically require this field, the FeatureSource will raise this event and allow you the developer to supply the data. In this way, you can query the SQL table and store the data in some sort of collection, and then when the event is raised, simply supply that data.
As this is an event, it will raise for each feature and field combination requested. This means that the event can be raised quite often, and we suggest that you cache the data you wish to supply in memory. We recommend against sending out a new SQL query each time this event is raised. Image that you are supplementing two columns and your query returns 2,000 rows. This means that if you requested those fields, the event would be raised 4,000 times.

Properties

ColumnName

Gets the name of the column for which data is requested.

public string ColumnName { get; }

Property Value

string

Id

Gets the identifier of the feature associated with the requested column.

public string Id { get; }

Property Value

string

ColumnValue

Gets or sets the value that will be returned to the requester.

public string ColumnValue { get; set; }

Property Value

string

Remarks:

Assign this property during the event to supply the external column value.

Constructors

CustomColumnFetchEventArgs(string, string)

This is the constructor that allows you to create the event arguments.

public CustomColumnFetchEventArgs(string columnName, string id)

Parameters

columnName string
The column name you need data for.

id string
The Id of the feature you need data for.

Remarks:

None