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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ComboBox PrepareViewStyleInfo refresh?

Thread ID:





101080 Sep 23,2011 05:30 PM UTC Sep 29,2011 05:11 AM UTC WinForms 2
Tags: GridControl
Sam Marrocco
Asked On September 23, 2011 05:30 PM UTC

I am using a column in a non-databound Grid to display comboboxes containing a list of words. The background color of the *closed* combobox should be red if a certain word ("Complete") is selected.

Using the PrepareViewStyleInfo() event seems to work....
Private Sub JobsGC_PrepareViewStyleInfo(sender As Object, e As Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs) Handles JobsGC.PrepareViewStyleInfo

If e.ColIndex = 7 And e.Style.CellType = "ComboBox" And e.Style.Text.ToUpper = "COMPLETE" Then

'only highlights the background color when the combo box in column 7 has "COMPLETE" selected.
e.Style.BackColor = PreferencesForm.CompleteColor.Color
End If
End Sub

However, after selection and closing of the combobox, the background color of the cb does not change immediately. It does not change until you select another cell in the grid.

How can I force an update of the combobox within the PrepareViewStyleInfo() event? Or am I performing the view changes in the wrong place? I would like the combobox to change it's style immediately after release/close of the drop down.

Sam Marrocco
Replied On September 28, 2011 12:24 AM UTC

Any suggestions to solve this?

Asarudheen S [Syncfusion]
Replied On September 29, 2011 05:11 AM UTC

Hi Sam,

Thank you for your interest in Syncfusion products.

Please follow up the incident 85516 because of both query are the same.

Please let us know if you have any further concern.



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon