Friday, February 09, 2007

.Net form ComboBox SelectedIndex = -1 seems does not work.

I ran into a problem in programming ComboBox on .Net Windows Form, we were clearing the ComboBox and then set the ComboBox.SelectedIndex = -1, which supposed to deselect the SelectedItem. However, the ComboBox still showing the old SelectedItem.

I found a workaround, first set the ComboBox.SelectedIndex = -1 before you call ComboBox.Items.Clear()

No comments:

Full Guide for using Bitnami Prometheus Operator Helm Chart with Additional Scrape Configuration

"The Prometheus Operator for Kubernetes provides easy monitoring definitions for Kubernetes services and deployment and management of...