andycharger Posted April 23, 2004 Posted April 23, 2004 I have a combobox that updates when a user click another combobox. The problem is, i need to reomove the old values from the combobox first. Example. I have a Make combo and model combo. When someone chooses FORD it should show Puma, Modeo, Escort,etc in the model box However, when they choose MERCEDES after already choosing FORD it does not remove the FORD models. Any ideas? I guess its some form of DELETE function? Quote
wessamzeidan Posted April 23, 2004 Posted April 23, 2004 use model.items.clear() before adding new items Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
andycharger Posted April 23, 2004 Author Posted April 23, 2004 Thanks. Works great! Now what if I want to add a default row at the top of my selection so the user has to select an item? How do I do this? i.e have the first entry in the drop down to be the word "Select..." Quote
wessamzeidan Posted April 23, 2004 Posted April 23, 2004 model.Items.clear() model.Items.Add("Select...") Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.