Hi Guys,
One of my user has many feature classes (100 and above) in particular sde connection.
I got a requirement to select one of the feature class from selected sde connection dynamically.
I use the following code and try to select the feature class on the fly.
It only achieve if user expand the gdb /sde connection project item.
If user does not expand the gdb item, this.SelectedConnection.GetItems() does not return child items (feature class items)
Any advice how to expand the gdbprojectitem? Uma Harano Wolfgang Kaiser
It need to be support for gdb or folderconnection contatiner and I am using version 2.5

<SPAN class="keyword token">try</SPAN>
<SPAN class="punctuation token">{</SPAN>
ArcGIS<SPAN class="punctuation token">.</SPAN>Desktop<SPAN class="punctuation token">.</SPAN>Core<SPAN class="punctuation token">.</SPAN>IProjectWindow projectWindow <SPAN class="operator token">=</SPAN> Project<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetCatalogPane</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Item currentSelectedItem <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">await</SPAN> <SPAN class="punctuation token">(</SPAN>QueuedTask<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Run</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">string</SPAN> finderPath <SPAN class="operator token">=</SPAN> Path<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Combine</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>_gdbPath<SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>SelectedFC<SPAN class="punctuation token">.</SPAN>FeatureClassName<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">return</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>SelectedConnection<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetItems</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">FirstOrDefault</SPAN><SPAN class="punctuation token">(</SPAN>x <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN> x<SPAN class="punctuation token">.</SPAN>Path<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Equals</SPAN><SPAN class="punctuation token">(</SPAN>finderPath<SPAN class="punctuation token">,</SPAN> StringComparison<SPAN class="punctuation token">.</SPAN>OrdinalIgnoreCase<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>currentSelectedItem <SPAN class="operator token">!=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">await</SPAN> projectWindow<SPAN class="punctuation token">.</SPAN><SPAN class="token function">SelectItemAsync</SPAN><SPAN class="punctuation token">(</SPAN>currentSelectedItem<SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>Best Regards,
Than