Flexgrid combobox image and text

Posted by: aroblesv on 6 August 2018, 5:19 pm EST

    • Post Options:
    • Link

    Posted 6 August 2018, 5:19 pm EST

    Hello,

    I have a combobox within a flexgrid cell with certain dropdown items (i.e. grid.Cols(2).ComboList=“|A|B|C”). Is it possible to add an image before the text of each item?

    Regards,

  • Posted 7 August 2018, 12:57 am EST

    Hi,

    It’s not possible to customize the default ComboList editor to display images. However you can use C1ComboBox to display images along with text in the dropdown.

    You can set an ImageList to ItemsImageList property of C1ComboBox and then set it as a column’s editor.

    
           'Add images to ImageList1
           Dim comboBox = New C1ComboBox()
           comboBox.AutoSize = True
           comboBox.ItemsImageList = ImageList1
    
           comboBox.Items.Add("Circle")
           comboBox.Items.Add("Square")
           comboBox.Items.Add("Triangle")
    
           grid.Cols(2).Editor = comboBox
           grid.Cols(2).ShowButtons = C1.Win.C1FlexGrid.ShowButtonsEnum.Always
    
    

    Please find the attached sample for the complete implementation.

    Thanks.

    ComboImageText.zip

  • Posted 7 August 2018, 3:47 pm EST

    Hello jitender.yadav,

    Thanks a lot for your help. Suggestion worked very well.

    Regards,

Need extra support?

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

Learn More

Forum Channels