# C1.Win.Editor.C1Editor.InsertTableAtSelectionAsync

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Editor_C1Editor_InsertTableAtSelectionAsync_" data-uid="C1.Win.Editor.C1Editor.InsertTableAtSelectionAsync*">InsertTableAtSelectionAsync Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Editor_C1Editor_InsertTableAtSelectionAsync_" data-uid="C1.Win.Editor.C1Editor.InsertTableAtSelectionAsync*"></a>
<h4 id="C1_Win_Editor_C1Editor_InsertTableAtSelectionAsync_System_String_System_Int32_System_Int32_System_Boolean_System_Boolean_System_String_" data-uid="C1.Win.Editor.C1Editor.InsertTableAtSelectionAsync(System.String,System.Int32,System.Int32,System.Boolean,System.Boolean,System.String)">InsertTableAtSelectionAsync(string, int, int, bool, bool, string)</h4>
<div class="markdown level1 summary"><p>Inserts a table described by the parameters at the current cursor position asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Task InsertTableAtSelectionAsync(string className, int cols, int rows, bool header, bool footer, string cssStyleInfo = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function InsertTableAtSelectionAsync(className As String, cols As Integer, rows As Integer, header As Boolean, footer As Boolean, Optional cssStyleInfo As String = Nothing) As Task</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="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">className</span></td>
      <td><p>A css classname to use when constructing the table.
If the classname is null, the default table css is used.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">cols</span></td>
      <td><p>Specifies the number of columns in the table.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">rows</span></td>
      <td><p>Specifies the number of rows in the table.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">header</span></td>
      <td><p>A bool specifying if the table should contain a header.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">footer</span></td>
      <td><p>A bool specifying if the table should contain a footer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">cssStyleInfo</span></td>
      <td><p>Specifies a css style definition for the table. If null, then the classname css style
is used. If both classname and cssTyleInfo are specified, the css class is defined.</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="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
