Migrate ComboList from vsflexgrid8 to C1FlexGrid

Posted by: hanthuong847742 on 7 August 2023, 1:20 am EST

    • Post Options:
    • Link

    Posted 7 August 2023, 1:20 am EST - Updated 7 August 2023, 1:25 am EST

    in vsflexgrid8 the ComboList property can generate multi-column lists. When migrating to C1FlexGrid I use SetCellStyle and MultiColumnDictionary. However, vsflexgrid8 can edit values in cells that are not in the combobox, C1FlexGrid cannot. How can I configure the same side as vsflexgrid8. Can you give me some suggestions? Thanks

    My code in C1FlexGrid

    [code]

    Private Sub C1FlexGrid1_BeforeEdit(sender As Object, e As RowColEventArgs) Handles C1FlexGrid1.BeforeEdit

    Dim str As String = “|…” & vbTab & “a” & “|EU” & vbTab & “b” & “|MC” & vbTab & “c”

    Dim existingCellStyle As CellStyle = C1FlexGrid1.GetCellStyleDisplay(e.Row, e.Col)

    existingCellStyle.DataMap = New MultiColumnDictionary(str, 0, True)

    C1FlexGrid1.SetCellStyle(e.Row, e.Col, existingCellStyle)

    TextBox2.Text = e.Row

    TextBox3.Text = e.Col

    C1FlexGrid1.Cols(e.Col).AllowEditing = True

    End Sub
    

    [/code]

  • Posted 8 August 2023, 2:20 am EST

    Hi,

    When the MultiColumnDictionary is used as the editor for the C1FlexGrid cells, it only allows input by selecting from the dropdown and not by user typing. To allow input by selecting from the dropdown as well as user-typing, we suggest using the C1Combo control as the editor. Please see the attached sample project for reference.

    FlexGrid.MultiColDictionary.zip

    Best Regards,

    Kartik

  • Posted 10 August 2023, 9:51 am EST

    Thanks you very much. You save my life :smiley:

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels