Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi Currently i'm using this to turn it into a data table

 featureCursor = layer.FeatureClass.Search(que, false);
                    row = featureCursor.NextFeature();

                    if (row != null)
                        for (int i = 0; i < row.Fields.FieldCount; i++)
                        while (row != null)
                            dataRow = dataTable.NewRow();

                            for (int j = 0; j < featureCursor.Fields.FieldCount; j++)
                                dataRow[j] = row.get_Value(j);

                            row = featureCursor.NextFeature();

Does anyone know a more efficient way on doing this.

Also I'm binding the data table to a datagrid, does anyone know a good way i can do this so that i can make the attribute table editable, and values reflected in the feature layer.

I can do this, but not cleanly, has anyone tried this before?

Thanks and Regards, Kev84

share|improve this question
Since you are using wpf, are you wanting to leverage INotifyPropertyChanged for the binding? – Kirk Kuykendall Aug 10 '11 at 20:52
up vote 2 down vote accepted

There is a binding sample from ESRI.

Check it out:

Same sample in ArcGIS 10 documentation

share|improve this answer
Tested this a while back and it worked, I think I also added a wrapper for the IRow to hide the ArcObjects interface from the .net code but that depends on what requirements you have. – MathiasWestin Aug 12 '11 at 7:36
how we could add Sort functionality to this wrapper ? – geogeek Jul 21 '12 at 12:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.