This example loads data to a vector layer from an SQL geometry data source. Once you edit vector layer items, changes are saved to the data source.
To load data from the SQL geometry data source, do the following:
-
Create an SqlGeometryDataAdapter object.
-
Specify its ConnectionString, SqlText and SpatialDataMember properties.
-
Assign this object to the VectorItemsLayer.Data property. Note that all data table fields loaded from the database are stored as attributes for each generated SqlGeometryItem object.
In this example, you can use the Map Editor to edit shapes. To save changes, call corresponding SQL commands in the MapEditor.MapItemEdited event handler.
(you will be redirected to DevExpress.com to submit your response)