How to set the BackgroundImage dynamically of a ComboDropDown ?

Hello,

I am using version 8.2.0.18
I am testing with the ComboDropDownDemo_2008 sample.

Is it possible to show the image of the selected gridlistcontrolitem as the BackgroundImage of the ComboDropDown control?

I changed the code of Grid_CellClick to:

if (this.gridListControl1.SelectedIndex != -1)
{
this.comboDropDown2.TextBox.Text = this.gridListControl1.SelectedItem.ToString();
this.comboDropDown2.BackgroundImage = (Image)this.gridListControl1.ImageList.Images[this.gridListControl1.SelectedIndex];
}
else
{
this.comboDropDown2.TextBox.Text = String.Empty;
this.comboDropDown2.BackgroundImage = null;
}

this.comboDropDown2.PopupContainer.HidePopup(PopupCloseType.Done);
....

But after setting of the BackgroundImage the result of BackgroundImage is still null.

What am I doing wrong ?

Thanks in advance !

Eric

1 Reply

LS Lingaraj S Syncfusion Team April 27, 2010 11:37 AM UTC

Hi Eric,

You have posted a similar kind of query in Incident (#67378). So please follow-up your queries with Incident (#67378).

Thank you for using Syncfusion products.

Regards,
Lingaraj S.

Loader.
Up arrow icon