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

I am trying to open a ArcGIS file browser. And For this, I used IGxDialog interface's DoModalOpen method. To specify what the user can select using a GxDialog browser is based on the filters (GxObjectFilter) held by the object. To browse workspace, I set ObjectFilter to GxFilterWorkspaces. But it allows folders that contains layers/feature classes/raster datasets that is not IGxDatabase or IWorkspace.

        IGxObjectFilter gxObjectFilter = new GxFilterWorkspaces();
        IGxDialog gxDialog = new GxDialog();
        gxDialog.AllowMultiSelect = false;
        gxDialog.Title = title;
        gxDialog.ObjectFilter = gxObjectFilter;
        gxDialog.ButtonCaption = "Open";
        gxDialog.RememberLocation = true;

        IEnumGxObject enumGxObject;
        gxDialog.DoModalOpen(0, out enumGxObject);
        while ((gxObject = enumGxObject.Next()) != null)
            if ((gxObject as IGxDatabase2) != null)
                return gxObject.FullName;


What should I do to select only workspace through this browser? Or is there any other option to browse GIS dataset?

share|improve this question
up vote 2 down vote accepted

A folder is also a workspace (e.g. for shapefiles).

I do not think there is a built-in filter for selecting geodatabases (if that's what you mean). You can pretty easily implement IGxObjectFilter yourself, though.

share|improve this answer

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.