This project is read-only.

Problems with having to reload the attribute table of a shapefile

Dec 12, 2012 at 3:59 PM

when I change the attribute table externally and I performed any function within Dotspatial.Control.Map the values ​​are shown when loading the initial shape into the application not the changed values.
anyone can help me?

Dec 13, 2012 at 11:19 AM

This way I can update the loaded map.

1. Load the attribute table to a datagridview.

Dim dt As DataTable

dt = PolygonLayer.DataSet.DataTable

 'Set the datagridview datasource from datatable dt

 Dim flex As DataGridView = New DataGridView()

flex.DataSource = dt

2. Now in the grid I make my changes.

after this.....

CType(Map1.Layers(i), MapPolygonLayer).DataSet.Save()








Dec 17, 2012 at 2:56 PM

Changes are made externally in the *. dbf using SQL, so I need to reload the attribute table of a shapefile into DotSpatial.Control.Map just thing I've accomplished so far it's the following:

Public Sub ReloadCache()
  Dim fLReloadCache As FeatureLayer
  Dim fSet As FeatureSet
  fSet = CType(FeatureSet.Open("C:\camiza.shp"),FeatureSet)
  fLReloadCache.DataSet.DataTable=fSet.DataTable 'Reload cache(reload table)
  'fLReloadCache.DataSet.Save()  'not need to save because all you need is to upload the modified data externally camiza.dbf
End Sub

And subsequently to update Feature Labeler...

Someone could give me suggestions?


Sorry for me english... :)