I use string strId=layer.EditTools.Add(newFeature);
to add a new feature into .shp file.
returning strId
is something like "wer234 wet345 ert456 er345"
. but when i use GetAllFeatures()
method, It turns out that the real inserted id for this feature is a string digit like 251
.
Is there a way to retrieve real inserted id of the feature when i just added it?
How to get newly added feature id?
Hi Reza,
If you view the API you can see the comment for it: This string is the ID that will uniquely identify this Feature while it is in a transaction.
So this id is not the real id for the added feature.
You can get the feature from layer again and know its id.
Regards,
Don