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 question

Thread ID:

Created:

Updated:

Platform:

Replies:

16260 Jul 9,2004 07:52 AM Jul 9,2004 02:07 PM Windows Forms 7
loading
Tags: GridControl
Nicola
Asked On July 9, 2004 07:52 AM

Hi, I was wondering if anyone has come across a way to change the background color of a combobox cell but not the button color. I am setting my cells background color to black but then the combobox button also changes to black. Any suggestions would be appreciated Thanks Nicola White

Administrator [Syncfusion]
Replied On July 9, 2004 08:30 AM

I do not see this behavior. Dropping a gridcontrol on a form and adding this form load, the combo button still shows gray for me. private void Form2_Load(object sender, System.EventArgs e) { this.gridControl1[2,2].CellType = "ComboBox"; this.gridControl1[2,2].BackColor = Color.Black; } Are you doing something different? Can you post a sample or show code where you are setting up the cell?

Nicola
Replied On July 9, 2004 08:43 AM

I am setting the background color in the PrepareViewStyleInfo function. Could this be causing my problem?

Administrator [Syncfusion]
Replied On July 9, 2004 08:55 AM

I added a PrepareViewStyleInfo event handler and set the e.Style.BackColor there when the cell was 2,2 and still could not see the problem. Do you really see a black button, or is the button missing (and this is reason the whole cell is black). If it is the latter, you might make sure you are setting e.Style.CellType = "ComboBox" in this case.

Nicola
Replied On July 9, 2004 08:59 AM

I really see a black button. I can click on it and my dropdown list appears.

Administrator [Syncfusion]
Replied On July 9, 2004 09:29 AM

Can you reproduce this in any of our samples, say the grid\samples\CellTypes\ComboBoxes? Or can you post a sample showing the problem?

Administrator [Syncfusion]
Replied On July 9, 2004 09:32 AM

Also, do you have XP-Themes enabled?

Nicola
Replied On July 9, 2004 02:07 PM

I figured out what I was doing wrong. I had intercepted the DrawCellButtonBackground event. And didn''t realize this is what was causing the problem. Thanks for all your help!

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.

;