# C1.Win.TrueDBGrid.BaseGrid.View.GetCellStyle

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_TrueDBGrid_BaseGrid_View_GetCellStyle_" data-uid="C1.Win.TrueDBGrid.BaseGrid.View.GetCellStyle*">GetCellStyle Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_TrueDBGrid_BaseGrid_View_GetCellStyle_" data-uid="C1.Win.TrueDBGrid.BaseGrid.View.GetCellStyle*"></a>
<h4 id="C1_Win_TrueDBGrid_BaseGrid_View_GetCellStyle_System_Int32_C1_Win_TrueDBGrid_C1DisplayColumn_System_Boolean_System_Boolean_" data-uid="C1.Win.TrueDBGrid.BaseGrid.View.GetCellStyle(System.Int32,C1.Win.TrueDBGrid.C1DisplayColumn,System.Boolean,System.Boolean)">GetCellStyle(int, C1DisplayColumn, bool, bool)</h4>
<div class="markdown level1 summary"><p>Returns a <a class="xref" href="C1.Win.TrueDBGrid.Style.html">Style</a> that is applied to the specified cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Style GetCellStyle(int row, C1DisplayColumn dc, bool ignoreSelection = false, bool ignoreFetchRowStyle = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetCellStyle(row As Integer, dc As C1DisplayColumn, Optional ignoreSelection As Boolean = False, Optional ignoreFetchRowStyle As Boolean = False) As Style</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">row</span></td>
      <td><p>Row index.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.TrueDBGrid.C1DisplayColumn.html">C1DisplayColumn</a></td>
      <td><span class="parametername">dc</span></td>
      <td><p>Split column.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">ignoreSelection</span></td>
      <td><p>Ignore selection style.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">ignoreFetchRowStyle</span></td>
      <td><p>Ignore user custom style.</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.TrueDBGrid.Style.html">Style</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_TrueDBGrid_BaseGrid_View_GetCellStyle_System_Int32_C1_Win_TrueDBGrid_C1DisplayColumn_System_Boolean_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The returned value is a copy of actual <a class="xref" href="C1.Win.TrueDBGrid.Style.html">Style</a> object and it cannot be changed in the event.</p>
</div>


<a id="C1_Win_TrueDBGrid_BaseGrid_View_GetCellStyle_" data-uid="C1.Win.TrueDBGrid.BaseGrid.View.GetCellStyle*"></a>
<h4 id="C1_Win_TrueDBGrid_BaseGrid_View_GetCellStyle_System_Int32_System_Int32_System_String_System_Boolean_" data-uid="C1.Win.TrueDBGrid.BaseGrid.View.GetCellStyle(System.Int32,System.Int32,System.String,System.Boolean)">GetCellStyle(int, int, string, bool)</h4>
<div class="markdown level1 summary"><p>Returns the style associated with a given cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected virtual Style GetCellStyle(int row, int col, string celltext, bool global = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Overridable Function GetCellStyle(row As Integer, col As Integer, celltext As String, Optional [global] As Boolean = False) As Style</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">row</span></td>
      <td><p>Row to fetch the style for.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">col</span></td>
      <td><p>Column to fetch the style for.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">celltext</span></td>
      <td><p>The text of the cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">global</span></td>
      <td><p>Ignore user custom style.</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.TrueDBGrid.Style.html">Style</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
