How to make OgrLayer selectable

Hi all,
I was using shapefiles and set its Selectable property to true/false;.
But I cannot find this property in OgrLayer! because I am loading layer from esri-geodatabase.
How to set this property?
Thanks in advance

Any help with this issue? I dont want to use shapefile.

Hello @alrajhi20

After adding the OGR layer to the map, and getting the layer handle, you can then get a Shapefile wrapper around the layer, and set the ‘selectable’ attribute on the Shapefile (you’ll actually be setting in on the OGR layer). Something like:

OgrLayer ogr = axMap1.get_OgrLayer(ogrLayerHandle);
Shapefile sf = ogr.GetBuffer(); // Shapefile wrapper around OgrLayer
sf.Selectable = true;

I hope that helps.

Regards,
Jerry.

Create, works beautifully.
Thank you Mr. Jerry