Hello community..
Situation:
I have a combobox with three items in the collection.
I have a condition when selected that removes an invalid option from the combobox so the user cant select it.
Issue:
When the condition reverses and the option is a valid choise, when selcted form the drop down it does not stay in the "combo box"(ill explain better) When you pick a item it shows in the combo box's control area, now when i selct the item i removed from the combo box list.it does not appear in the controls drawn area.
here is my code that does the event.
Any advice apreciated, will give more info if requested... Thanx!Code:If (cboSqlSearchCriteria.SelectedIndex = 0 Or cboSqlSearchCriteria.SelectedIndex = 5 Or cboSqlSearchCriteria.SelectedIndex = 7) Then Try cboSqlCondition.Items.RemoveAt(2) cboSqlCondition.Items.Add("Like (%text%)") cboSqlCondition.Update() Catch ex As Exception cboSqlCondition.Items.Add("Like (%text%)") End Try Else Try cboSqlCondition.Items.RemoveAt(2) Catch ex As Exception 'no event End Try End If




Reply With Quote