Congratulations - C# Corner Q4, 2022 MVPs Announced
Why Join
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
abburi chowdary
2k
60
12.7k
How can we clear data in combobx2 on selecting next item in
Apr 26 2018 1:52 AM
I used two combo boxes cmbhospitals and cmbusers in cmbusers when i click hospital A in 1st combbox it displays users of that hospital but again when i click on hospital B in cmbusers(Combobox2) it was displaying both users og hospital A and B I used if which clears the text but not the previous hosptal data please suggest.
I used below three to clear but getting the same old values when selecting.
//cmbhusers.SelectedItem=null;
cmbhusers.Items.Clear();
cmbhusers.ResetText();
cmbhusers.SelectedIndex=-1;
Reply
Answers (
2
)
Index was outside the bounds of the array C#
Two lines in one row? Itext sharp