# C1.Win.FlexGrid.RowCol.StyleNew

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_FlexGrid_RowCol_StyleNew_" data-uid="C1.Win.FlexGrid.RowCol.StyleNew*">StyleNew Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_FlexGrid_RowCol_StyleNew_" data-uid="C1.Win.FlexGrid.RowCol.StyleNew*"></a>
<h4 id="C1_Win_FlexGrid_RowCol_StyleNew" data-uid="C1.Win.FlexGrid.RowCol.StyleNew">StyleNew</h4>
<div class="markdown level1 summary"><p>Gets or sets a custom <a class="xref" href="C1.Win.FlexGrid.CellStyle.html">CellStyle</a> associated with this row or column, creating a new
style if necessary.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Browsable(false)]
public virtual CellStyle StyleNew { get; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Browsable(False)&gt;
Public Overridable ReadOnly Property StyleNew As CellStyle</code></pre>
</div>
<h5 id="C1_Win_FlexGrid_RowCol_StyleNew_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This property never returns null. If this element does not have a custom style, a new one will be
created automatically and returned.</p>
</div>
<h5 id="C1_Win_FlexGrid_RowCol_StyleNew_examples">Examples</h5>
<p>The code below sets a column's background color to red.</p>
<pre><code class="lang-csharp">// get the style associated with column 1 (create a new one if necessary)
CellStyle cs = _flex.Cols[1].StyleNew.BackColor;

// set the new style's back color to red
cs.BackColor = Color.Red;</code></pre>

</div>
