Hallo,
short question: I have a shapefile, no specific column with unique values - populate this shapefile via MapEngine.LoadDataTable to a datagrid-Control, select a row in the datagrid -> how can i get the feature.id (Recordnumber)?
Torsten
Hallo,
short question: I have a shapefile, no specific column with unique values - populate this shapefile via MapEngine.LoadDataTable to a datagrid-Control, select a row in the datagrid -> how can i get the feature.id (Recordnumber)?
Torsten
Torsten,
Thanks for your post and question.
When we use the API MapEngine.LoadDataTable, we have to passed in a set of Features, in which the feature ID has already be set, so how did you get those features out?
Please feel free if I am mistaken anything.
Thanks.
Yale
Hello Yale,
Thank you for your quick answer. I have a Usercontrol that contains an Infragistics Datagrid. This control knows nothing about MapSuite-Classes - there are only a few interfaces for interacting. The Datagrid-control get the Datas basicly from MapEngine.LoadDataTable - with all Columns. I can't see any "FeatureId" column in the Datagrid. Do I overlook something?
Torsten
Torsten,
Actually, the selected row number of the datagrid is the feature id value, you can get the selected row number easily according to the following code:
DataGrid1.CurrentRowIndex + 1;
Because the minimum feature id value is 1, it needs to add "1" to avoid the out of index range exception.
Thanks,
Scott,
Scott,
it works perfect. Thanks..
Torsten,
You are welcome, any more questions please let me know again,
Thanks,
Scott,