ComponentOne FlexPivot for WinForms
C1.Win.FlexPivot.4.8 Assembly / C1.Win.FlexPivot Namespace / C1FlexPivotGrid Class / ComboList Property

In This Topic
    ComboList Property (C1FlexPivotGrid)
    In This Topic
    Gets or sets the list of items to be used by the drop-down editor.
    Syntax
    'Declaration
     
    Public Property ComboList As String
    public string ComboList {get; set;}
    Remarks

    The C1.Win.C1FlexGrid.C1FlexGridBase.ComboList 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.

    To use the C1.Win.C1FlexGrid.C1FlexGridBase.ComboList property, set the C1.Win.C1FlexGrid.C1FlexGridBase.AllowEditing property to true and respond to the C1.Win.C1FlexGrid.C1FlexGridBase.BeforeEdit event by setting the C1.Win.C1FlexGrid.C1FlexGridBase.ComboList property to a string that describes the type of editing you want to use for that cell. The options are described below:

    1. To edit the cell using a regular text box, set the C1.Win.C1FlexGrid.C1FlexGridBase.ComboList property to an empty string. For example:

    flex.ComboList = string.Empty;

    2. To edit the cell using a drop-down list, set the C1.Win.C1FlexGrid.C1FlexGridBase.ComboList property to a string containing the available options, separated by pipe characters. For example:

    flex.ComboList = "Item 1|Item 2|Item 3";

    3. To edit the cell using a drop-down combo, set the C1.Win.C1FlexGrid.C1FlexGridBase.ComboList property to a string containing the available options, separated by pipe characters ("|") and starting with a pipe character. For example:

    flex.ComboList = "|Item 1|Item 2|Item 3";

    4. To display an edit button, set the C1.Win.C1FlexGrid.C1FlexGridBase.ComboList 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:

    flex.ComboList = "...";

    5. To display an edit button next to an editable cell, set the C1.Win.C1FlexGrid.C1FlexGridBase.ComboList 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:

    flex.ComboList = "|...";

    The C1.Win.C1FlexGrid.C1FlexGridBase.ComboList 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 C1.Win.C1FlexGrid.C1FlexGridBase.ComboList property allows you to adjust the type of editing you want to provide depending on the current row.

    If all rows in the column contain the same type of data, use the Column's C1.Win.C1FlexGrid.RowCol.ComboList 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.

    Note that the ComboList 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 C1.Win.C1FlexGrid.RowCol.DataMap property. The DataMap 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).

    Example
    The code below handles the C1.Win.C1FlexGrid.C1FlexGridBase.BeforeEdit event and assigns a value to the C1.Win.C1FlexGrid.C1FlexGridBase.ComboList property so that the grid displays buttons on every other row.
    See Also