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. Image for the cookie policy date
close icon

ComboBox PrepareViewStyleInfo refresh?

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.



2 Replies

SM Sam Marrocco September 28, 2011 12:24 AM UTC

Any suggestions to solve this?



AS Asarudheen S Syncfusion Team 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.

Regards,
Asarudheen.



Loader.
Live Chat Icon For mobile
Up arrow icon