# C1.Win.FlexGrid.C1FlexGridBase.Styles

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_FlexGrid_C1FlexGridBase_Styles_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.Styles*">Styles Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_FlexGrid_C1FlexGridBase_Styles_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.Styles*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGridBase_Styles" data-uid="C1.Win.FlexGrid.C1FlexGridBase.Styles">Styles</h4>
<div class="markdown level1 summary"><p>Gets the collection of cell styles defined in the grid.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public CellStyleCollection Styles { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Property Styles As CellStyleCollection</code></pre>
</div>
<h5 id="C1_Win_FlexGrid_C1FlexGridBase_Styles_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.Styles.html#C1_Win_FlexGrid_C1FlexGridBase_Styles">Styles</a> property enables you to obtain a reference to the list of 
styles that are currently defined in the grid. With this reference, you can add, remove, 
and count the styles. For more information on the tasks that can be performed with this 
collection, see the <a class="xref" href="C1.Win.FlexGrid.CellStyleCollection.html">CellStyleCollection</a> class reference topics. For information 
on cell formatting, see the <a class="xref" href="C1.Win.FlexGrid.CellStyle.html">CellStyle</a> reference topics.</p>
<p>This property is read-only. The grid creates and manages the collection for you.</p>
<p>Upgrade Note: The VSFlexGrid ActiveX control had many properties that affected the way 
the grid was displayed (e.g. BackColor, BackColorAlternate, BackColorBkg, BackColorFixed, 
BackColorFrozen, BackColorSel, and so on). The C1FlexGrid control replaces all these 
properties with a collection of <a class="xref" href="C1.Win.FlexGrid.CellStyle.html">CellStyle</a> objects. This makes the object 
model simpler, more consistent, and more powerful. You can change the built-in styles or 
define your own, and assign them to rows, columns, or arbitrary cell ranges.</p>
</div>
</div>
