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




dt
DataTable to convert to a feature graphics layer.
renderer
Renderer to use when the point is not selected or highlighted.
selectedRenderer
Renderer to use when the point is selected
highlightRenderer
Renderer to use when the point is highlighted.
selectFeatures
Whether the inital IsSelected state of features should be set to true.
Converts a System.Data.DataTable to an ESRI Web ADF feature graphics layer.

Syntax

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

Parameters

dt
DataTable to convert to a feature graphics layer.
renderer
Renderer to use when the point is not selected or highlighted.
selectedRenderer
Renderer to use when the point is selected
highlightRenderer
Renderer to use when the point is highlighted.
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 graphics column. If this column is 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 null since the renderer parameters can only be used with a feature graphics layer.

See Also

© 2010 All Rights Reserved.