# C1.Win.FlexGrid.Node.AddNode

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_FlexGrid_Node_AddNode_" data-uid="C1.Win.FlexGrid.Node.AddNode*">AddNode Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_FlexGrid_Node_AddNode_" data-uid="C1.Win.FlexGrid.Node.AddNode*"></a>
<h4 id="C1_Win_FlexGrid_Node_AddNode_C1_Win_FlexGrid_NodeTypeEnum_System_Object_System_Object_System_Drawing_Image_System_Boolean_" data-uid="C1.Win.FlexGrid.Node.AddNode(C1.Win.FlexGrid.NodeTypeEnum,System.Object,System.Object,System.Drawing.Image,System.Boolean)">AddNode(NodeTypeEnum, object, object, Image, bool)</h4>
<div class="markdown level1 summary"><p>Creates a node row at a specified position relative to this node.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Node AddNode(NodeTypeEnum position, object data, object key, Image img, bool collapsed = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddNode(position As NodeTypeEnum, data As Object, key As Object, img As Image, Optional collapsed As Boolean = False) As Node</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Win.FlexGrid.NodeTypeEnum.html">NodeTypeEnum</a></td>
      <td><span class="parametername">position</span></td>
      <td><p>A value from the <a class="xref" href="C1.Win.FlexGrid.NodeTypeEnum.html">NodeTypeEnum</a> enumeration that specifies
where the new node will be added with respect to this node (e.g. Child, Sibling).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>Value of the <a class="xref" href="C1.Win.FlexGrid.Node.Data.html#C1_Win_FlexGrid_Node_Data">Data</a> property for the new node.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">key</span></td>
      <td><p>Value of the <a class="xref" href="C1.Win.FlexGrid.Node.Key.html#C1_Win_FlexGrid_Node_Key">Key</a> property for the new node.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.image">Image</a></td>
      <td><span class="parametername">img</span></td>
      <td><p>Value of the <a class="xref" href="C1.Win.FlexGrid.Node.Image.html#C1_Win_FlexGrid_Node_Image">Image</a> property for the new node.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">collapsed</span></td>
      <td><p>Collapsed state of the added node.</p>
</td>
    </tr>
  </tbody>
</table>
<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="C1.Win.FlexGrid.Node.html">Node</a></td>
      <td><p>A reference to the new <a class="xref" href="C1.Win.FlexGrid.Node.html">Node</a> added to the grid.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_FlexGrid_Node_AddNode_" data-uid="C1.Win.FlexGrid.Node.AddNode*"></a>
<h4 id="C1_Win_FlexGrid_Node_AddNode_C1_Win_FlexGrid_NodeTypeEnum_System_Object_System_Boolean_" data-uid="C1.Win.FlexGrid.Node.AddNode(C1.Win.FlexGrid.NodeTypeEnum,System.Object,System.Boolean)">AddNode(NodeTypeEnum, object, bool)</h4>
<div class="markdown level1 summary"><p>Creates a node row at a specified position relative to this node.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Node AddNode(NodeTypeEnum position, object data, bool collapsed = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddNode(position As NodeTypeEnum, data As Object, Optional collapsed As Boolean = False) As Node</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Win.FlexGrid.NodeTypeEnum.html">NodeTypeEnum</a></td>
      <td><span class="parametername">position</span></td>
      <td><p>A value from the <a class="xref" href="C1.Win.FlexGrid.NodeTypeEnum.html">NodeTypeEnum</a> enumeration that specifies
where the new node will be added with respect to this node (e.g. Child, Sibling).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">data</span></td>
      <td><p>Value of the <a class="xref" href="C1.Win.FlexGrid.Node.Data.html#C1_Win_FlexGrid_Node_Data">Data</a> property for the new node.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">collapsed</span></td>
      <td><p>Collapsed state of the added node.</p>
</td>
    </tr>
  </tbody>
</table>
<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="C1.Win.FlexGrid.Node.html">Node</a></td>
      <td><p>A reference to the new <a class="xref" href="C1.Win.FlexGrid.Node.html">Node</a> added to the grid.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
