# GrapeCity.ActiveReports.Viewer.Win.Viewer.TableOfContentsAfterSelect

## Content

<div class="doc-site-dotnet-api-container">




<h1 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_TableOfContentsAfterSelect" data-uid="GrapeCity.ActiveReports.Viewer.Win.Viewer.TableOfContentsAfterSelect" class="text-break">TableOfContentsAfterSelect Event
</h1>
<div class="markdown level0 summary"><p>Occurs after an item is selected in the table of contents treeview.</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.ActiveReports.Viewer.Win.html">GrapeCity.ActiveReports.Viewer.Win</a></h6>
<h6><strong>Assembly</strong>: MESCIUS.ActiveReports.Viewer.Win.dll</h6>
<h5 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_TableOfContentsAfterSelect_syntax">Syntax</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public event TreeViewEventHandler TableOfContentsAfterSelect</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.treevieweventhandler">TreeViewEventHandler</a></td>
      <td>Occurs after an item is selected in the table of contents treeview.</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_TableOfContentsAfterSelect_remarks"><strong>Remarks</strong></h5>
<div class="markdown level0 remarks"><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.treevieweventargs">TreeViewEventArgs</a> provides information about the selected item, enabling event handlers to access the item's properties
and take appropriate actions, such as navigating to the corresponding section in the document.</p>
</div>
<h5 id="GrapeCity_ActiveReports_Viewer_Win_Viewer_TableOfContentsAfterSelect_examples"><strong>Examples</strong></h5>
<pre><code class="lang-csharp">// Assuming 'viewer' is an instance of the Viewer class
// Subscribe to the TableOfContentsAfterSelect event
viewer.TableOfContentsAfterSelect += Viewer_TableOfContentsAfterSelect;
// Event handler for TableOfContentsAfterSelect
private void Viewer_TableOfContentsAfterSelect(object sender, TreeViewEventArgs e)
{
	var selectedNodeText = e.Node.Text;
	MessageBox.Show($"You have selected: {selectedNodeText}", "TOC Selection");
}</code></pre>

</div>
