|
-
October 10th, 2008, 03:26 PM
#1
ComboBox event issue
Hi guys,
I have a ComboBox which when entering focus I wish for it to populate itself with values from an SQL server.
At the moment I have:
Code:
private void supplierNameBox_Enter(object sender, EventArgs e)
{
SupplierName.Clear(); //This is a table
DbDataAdapter.SelectCommand = supplierNameSelectCommand;
DbDataAdapter.Fill(DbMenuDataSet, "Supplier");
}
However when my first click that brings the box into focus is the drop-down arrow, it somehow manages to duplicate the data entries, displaying them twice. Yet when i add a line such as:
Code:
MessageBox.Show("bla");
to the top of the function it works fine, except obviously I don't want a message box popping up!
Any help would be amazing guys.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|