AnsweredAssumed Answered

Can not select a ArcGIS Online layer using OpenItemDialog

Question asked by laolai on Mar 27, 2019
Latest reply on Apr 23, 2019 by laolai

I was trying to select a layer from ArcGIS Online using the following code.  I can click the layer but pDialog.Items also return empty.  Any ideas?



var pDialog = new ArcGIS.Desktop.Catalog.OpenItemDialog();
pDialog.MultiSelect = false;
pDialog.Filter = "tables_all";
var pItems = pDialog.Items;
if (pItems == null) return;

var pList = pItems.ToList<ArcGIS.Desktop.Core.Item>();
if (pList.Count < 1) return;

var pItem = pList[0];
if (pItem == null) return;