TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
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
Forums
Monthly Leaders
Forum guidelines
Ajit N
NA
352
71.2k
How To Refresh ComboBox ?
Jan 19 2017 1:58 AM
Hi, I want to refresh the combobox. when i update data in child form, the combobox will be update in parent form. i tried following code it will update, but in combobox it also displayed the previous data.
so help me how can i refresh combobox ?
This is my code....
private
void
StudentRegistration_Load(
object
sender, EventArgs e)
{
cmbclass.Items.Clear();
FillClass();
}
public
void
FillClass()
{
SqlCommand cmdfill =
new
SqlCommand(
"select Class from AddClass"
, con);
SqlDataReader drfill = cmdfill.ExecuteReader();
while
(drfill.Read())
{
cmbclass.Items.Add(drfill[0]);
}
}
Reply
Answers (
4
)
Writting text on PDF
Code not working Properly