# C1.Win.List.ListBase.C1ListBase.CellContaining

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_List_ListBase_C1ListBase_CellContaining_" data-uid="C1.Win.List.ListBase.C1ListBase.CellContaining*">CellContaining Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_List_ListBase_C1ListBase_CellContaining_" data-uid="C1.Win.List.ListBase.C1ListBase.CellContaining*"></a>
<h4 id="C1_Win_List_ListBase_C1ListBase_CellContaining_System_Int32_System_Int32_System_Int32__System_Int32__" data-uid="C1.Win.List.ListBase.C1ListBase.CellContaining(System.Int32,System.Int32,System.Int32@,System.Int32@)">CellContaining(int, int, out int, out int)</h4>
<div class="markdown level1 summary"><p>Returns the cell position for a set of coordinates.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool CellContaining(int x, int y, out int rowAt, out int colAt)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CellContaining(x As Integer, y As Integer, ByRef rowAt As Integer, ByRef colAt As Integer) As Boolean</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.int32">int</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>Integer that defines the x coordinate in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>Integer that defines the y coordinate in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">rowAt</span></td>
      <td><p>Integer that receives the zero-based index of the row beneath the specified y coordinate.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">colAt</span></td>
      <td><p>Integer that receives the zero-based index of the column beneath the specified y coordinate.</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.boolean">bool</a></td>
      <td><p>A boolean that indicates whether a data cell is beneath the specified coordinate pair.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_List_ListBase_C1ListBase_CellContaining_System_Int32_System_Int32_System_Int32__System_Int32___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The CellContaining method combines the <a class="xref" href="C1.Win.List.ListBase.C1ListBase.ColContaining.html#C1_Win_List_ListBase_C1ListBase_ColContaining_System_Int32_">ColContaining(int)</a> and <a class="xref" href="C1.Win.List.ListBase.C1ListBase.RowContaining.html#C1_Win_List_ListBase_C1ListBase_RowContaining_System_Int32_">RowContaining(int)</a> methods into one call.
If the coordinate pair specified by x and y points to a data cell, this method returns True, and the rowindex and colindex arguments receive zero-based indexes that identify the cell.</p>
</div>
</div>
