# C1.Win.FlexGrid.C1FlexGridBase.ComboList

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_FlexGrid_C1FlexGridBase_ComboList_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ComboList*">ComboList Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_FlexGrid_C1FlexGridBase_ComboList_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ComboList*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGridBase_ComboList" data-uid="C1.Win.FlexGrid.C1FlexGridBase.ComboList">ComboList</h4>
<div class="markdown level1 summary"><p>Gets or sets the list of items to be used by the drop-down editor.</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 string ComboList { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Browsable(False)&gt;
Public Property ComboList As String</code></pre>
</div>
<h5 id="C1_Win_FlexGrid_C1FlexGridBase_ComboList_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.ComboList.html#C1_Win_FlexGrid_C1FlexGridBase_ComboList">ComboList</a> property specifies the type of editor to be used when 
editing a cell. You may use a text box, drop-down list, drop-down combo, or an edit button 
to pop up custom editor forms.</p>
<p>To use the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.ComboList.html#C1_Win_FlexGrid_C1FlexGridBase_ComboList">ComboList</a> property, set the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.AllowEditing.html#C1_Win_FlexGrid_C1FlexGridBase_AllowEditing">AllowEditing</a> property 
to true and respond to the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.BeforeEdit.html">BeforeEdit</a> event by setting the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.ComboList.html#C1_Win_FlexGrid_C1FlexGridBase_ComboList">ComboList</a> 
property to a string that describes the type of editing you want to use for that cell.
The options are described below:</p>
<p>1. To edit the cell using a regular text box, set the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.ComboList.html#C1_Win_FlexGrid_C1FlexGridBase_ComboList">ComboList</a> property to an empty string. 
For example:</p>
<pre><code class="lang-csharp">flex.ComboList = string.Empty;</code></pre>
<p>2. To edit the cell using a drop-down list, set the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.ComboList.html#C1_Win_FlexGrid_C1FlexGridBase_ComboList">ComboList</a> property to a string containing the 
available options, separated by pipe characters. For example:</p>
<pre><code class="lang-csharp">flex.ComboList = "Item 1|Item 2|Item 3";</code></pre>
<p>3. To edit the cell using a drop-down combo, set the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.ComboList.html#C1_Win_FlexGrid_C1FlexGridBase_ComboList">ComboList</a> property to a string containing the 
available options, separated by pipe characters ("|") and starting with a pipe character. For example:</p>
<pre><code class="lang-csharp">flex.ComboList = "|Item 1|Item 2|Item 3";</code></pre>
<p>4. To display an edit button, set the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.ComboList.html#C1_Win_FlexGrid_C1FlexGridBase_ComboList">ComboList</a> property to a string containing an ellipsis ("..."). 
Edit buttons look like regular push buttons, aligned to the right of the cell, with an ellipsis as a caption. 
When the user clicks on the edit button, the grid fires the CellButtonClick event. In this case, the user can't 
edit the cell contents directly. For example:</p>
<pre><code class="lang-csharp">flex.ComboList = "...";</code></pre>
<p>5. To display an edit button next to an editable cell, set the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.ComboList.html#C1_Win_FlexGrid_C1FlexGridBase_ComboList">ComboList</a> property to a string 
containing a pipe and an ellipsis ("|..."). In this case, you get a regular edit button but the user can also edit the
cell contents directly. For example:</p>
<pre><code class="lang-csharp">flex.ComboList = "|...";</code></pre>
<p>The <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.ComboList.html#C1_Win_FlexGrid_C1FlexGridBase_ComboList">ComboList</a> property is especially useful in cases where different rows in 
the same column may contain different types of data (for example a control such as the PropertyGrid).
In this case, the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.ComboList.html#C1_Win_FlexGrid_C1FlexGridBase_ComboList">ComboList</a> property allows you to adjust the type of editing you 
want to provide depending on the current row.</p>
<p>If all rows in the column contain the same type of data, use the Column's <a class="xref" href="C1.Win.FlexGrid.RowCol.ComboList.html#C1_Win_FlexGrid_RowCol_ComboList">ComboList</a> 
property instead. This way, the grid will automatically select the list depending on the column 
being edited and you don't need to handle any events.</p>
<p>Note that the <b>ComboList</b> allows you to specify lists of strings only. Cells will store and display 
these strings. If you want to store a certain type of data and display values associated with that data, see
the <a class="xref" href="C1.Win.FlexGrid.RowCol.DataMap.html#C1_Win_FlexGrid_RowCol_DataMap">DataMap</a> property. The <b>DataMap</b> property allows you to store values in the cells 
(for example a CustomerID) and display strings associated with that data (for example the customer name).</p>
</div>
<h5 id="C1_Win_FlexGrid_C1FlexGridBase_ComboList_examples">Examples</h5>
<p>The code below handles the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.BeforeEdit.html">BeforeEdit</a> event and assigns a value to the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.ComboList.html#C1_Win_FlexGrid_C1FlexGridBase_ComboList">ComboList</a>
property so that the grid displays buttons on every other row.</p>
<pre><code class="lang-csharp">void _flex_BeforeEdit(object sender, RowColEventArgs e)
{
  _flex.ComboList = string.Empty;
  if (e.Row % 2 == 0) _flex.ComboList = "...";
}</code></pre>

</div>
