We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

ComboBox with images

Thread ID:

Created:

Updated:

Platform:

Replies:

39022 Dec 22,2005 03:49 PM Dec 24,2005 05:19 AM Windows Forms 2
loading
Tags: GridControl
Prokopis
Asked On December 22, 2005 03:49 PM

I would like to have a grid with comboboxs and the combobox to have images items or both text and image. Is that possible to be done?

Administrator [Syncfusion]
Replied On December 23, 2005 12:03 PM

Hi Prokopis, You can''t do this with the normal combobox cell. The dropdown part of the combobox is the windowsform''s ListBox. Instead of a ComboBox celltype, you can use a GridListControl celltype and display an icon in a column. Here is a sample. This will work if you have an ArrayList/ DataTable as the datasource. You can create an DataTable object and load the items to it. This is achieved by subscribing to the dropdown''s embedded grid''s PrepareViewStyleInfo event and dynamically setting e.Style.ImageIndex and e.Style.ImageList. Best regards, Jay

Prokopis
Replied On December 24, 2005 05:19 AM

Thank you very much Jay. Your sample is good. Very fast correspondence.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;