# GrapeCity.Win.Spread.InputMan.CellType.SubStyleCollection.Add

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Win_Spread_InputMan_CellType_SubStyleCollection_Add_" data-uid="GrapeCity.Win.Spread.InputMan.CellType.SubStyleCollection.Add*">Add Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Win_Spread_InputMan_CellType_SubStyleCollection_Add_" data-uid="GrapeCity.Win.Spread.InputMan.CellType.SubStyleCollection.Add*"></a>
<h4 id="GrapeCity_Win_Spread_InputMan_CellType_SubStyleCollection_Add_System_String_" data-uid="GrapeCity.Win.Spread.InputMan.CellType.SubStyleCollection.Add(System.String)">Add(string)</h4>
<div class="markdown level1 summary"><p>Adds a new SubStyle with the specified key into the <b>SubStyleCollection</b>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int Add(string key)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Add(key As String) As Integer</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">key</span></td>
      <td><p>The key of this <b>SubStyle</b> object.</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.int32">int</a></td>
      <td><p>The index of this item in <b>SubStyleCollection</b>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Win_Spread_InputMan_CellType_SubStyleCollection_Add_" data-uid="GrapeCity.Win.Spread.InputMan.CellType.SubStyleCollection.Add*"></a>
<h4 id="GrapeCity_Win_Spread_InputMan_CellType_SubStyleCollection_Add_System_String_GrapeCity_Win_Spread_InputMan_CellType_SubStyle_" data-uid="GrapeCity.Win.Spread.InputMan.CellType.SubStyleCollection.Add(System.String,GrapeCity.Win.Spread.InputMan.CellType.SubStyle)">Add(string, SubStyle)</h4>
<div class="markdown level1 summary"><p>Adds an item with the specified key and value into the <b>SubStyleCollection</b>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int Add(string key, SubStyle subStyle)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Add(key As String, subStyle As SubStyle) As Integer</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">key</span></td>
      <td><p>The key of this item.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Win.Spread.InputMan.CellType.SubStyle.html">SubStyle</a></td>
      <td><span class="parametername">subStyle</span></td>
      <td><p>The value of this item (a <b>SubStyle</b>).</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.int32">int</a></td>
      <td><p>The index of this item in <b>SubStyleCollection</b>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
