# C1.Win.FlexGrid.RowCol.DataType

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_FlexGrid_RowCol_DataType_" data-uid="C1.Win.FlexGrid.RowCol.DataType*">DataType Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_FlexGrid_RowCol_DataType_" data-uid="C1.Win.FlexGrid.RowCol.DataType*"></a>
<h4 id="C1_Win_FlexGrid_RowCol_DataType" data-uid="C1.Win.FlexGrid.RowCol.DataType">DataType</h4>
<div class="markdown level1 summary"><p>Gets or sets the type of object stored in this row or column.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[TypeConverter(typeof(GridDataTypeConverter))]
public virtual Type DataType { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;TypeConverter(GetType(GridDataTypeConverter))&gt;
Public Overridable Property DataType As Type</code></pre>
</div>
<h5 id="C1_Win_FlexGrid_RowCol_DataType_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>By default, the column's DataType property is set to <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>, which allows you to store 
any data values in the column.</p>
<p>If you set a row or column's DataType to a specific type, the grid will try to convert any values assigned 
to cells in that column to the specified data type. If the conversion fails, the grid will fire a
<a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.GridError.html">GridError</a> event and the cell value will not be changed.
</p>
<p>The DataType property affects how values are stored internally in the grid, how they are sorted, and the 
type of control that is used to edit the values in the column. For example, a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.datetimepicker">DateTimePicker</a> 
control is used to edit values in <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> columns, and check boxes are used to display and edit 
values in Boolean columns.</p>
<p>If you want to store times (not dates) in a column, you can still use the DateTime type, but you should 
use a <a class="xref" href="C1.Win.FlexGrid.RowCol.Format.html#C1_Win_FlexGrid_RowCol_Format">Format</a> that displays only the time, not the date.
</p>
</div>
</div>
