Sample code that demonstrates how to get the value of a single cell in an attribute table.

using DotSpatial.Data;

 private void btnBuffer_Click(object sender, EventArgs e)
        {
            FeatureSet fs = new FeatureSet();
            fs.FillAttributes();
            fs.Open("C:\\Temp\\roads.shp");
            DataTable dt = fs.DataTable;
            for (int row = 0; row < dt.Rows.Count; row++)
            {
                object val = dtOriginal.Rows[row]["LENGTH"];
            }
        }

Last edited Jul 13, 2010 at 2:56 PM by AlamoMan, version 3

Comments

No comments yet.