ESRI.ArcGIS.ADF.Web
ToGraphicsLayer(DataTable,Color,Color,Color,Boolean) Method
See Also 
ESRI.ArcGIS.ADF.Web Namespace > Converter Class > ToGraphicsLayer Method : ToGraphicsLayer(DataTable,Color,Color,Color,Boolean) Method




dt
DataTable to convert to a graphics layer.
symbolColor
Color with which to render the features in the graphics layer.
selectedSymbolColor
Color with which to render features that may be selected in the graphics layer.
highlightSymbolColor
Color with which to render highlighted features in the graphics layer. This only applies when the graphics layer has RenderOnClient set to true.
selectFeatures
Whether the inital IsSelected state of features should be set to true.
Converts a System.Data.DataTable to an ESRI Web ADF graphics layer.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function ToGraphicsLayer( _
   ByVal dt As DataTable, _
   ByVal symbolColor As Color, _
   ByVal selectedSymbolColor As Color, _
   ByVal highlightSymbolColor As Color, _
   ByVal selectFeatures As Boolean _
) As GraphicsLayer
Visual Basic (Usage)Copy Code
Dim dt As DataTable
Dim symbolColor As Color
Dim selectedSymbolColor As Color
Dim highlightSymbolColor As Color
Dim selectFeatures As Boolean
Dim value As GraphicsLayer
 
value = Converter.ToGraphicsLayer(dt, symbolColor, selectedSymbolColor, highlightSymbolColor, selectFeatures)
C# 
public static GraphicsLayer ToGraphicsLayer( 
   DataTable dt,
   Color symbolColor,
   Color selectedSymbolColor,
   Color highlightSymbolColor,
   bool selectFeatures
)

Parameters

dt
DataTable to convert to a graphics layer.
symbolColor
Color with which to render the features in the graphics layer.
selectedSymbolColor
Color with which to render features that may be selected in the graphics layer.
highlightSymbolColor
Color with which to render highlighted features in the graphics layer. This only applies when the graphics layer has RenderOnClient set to true.
selectFeatures
Whether the inital IsSelected state of features should be set to true.

Return Value

ESRI Web ADF graphics layer.

Remarks

In order for conversion to a graphics layer to occur properly, the DataTable must contain a geometry or a graphics column. If it doesn't, this method will return null. If the data table contains a column of type ESRI.ArcGIS.ADF.Web.Geometry.Geometry and all rows contain the same geometry type (point, line or polygon), then the output layer will be a feature graphics layer (ESRI.ArcGIS.ADF.Web.Display.Graphics.FeatureGraphicsLayer). Otherwise, the output layer will be an element graphics layer. (ESRI.ArcGIS.ADF.Web.Display.Graphics.ElementGraphicsLayer).

See Also

© 2010 All Rights Reserved.