Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Search window
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Search window
Divers
Thread ID:
00864740
Message ID:
00864740
Vues:
63
I have created a simple search window that has some textboxes and some DropDowns on it. The DropDownStyle of the DropDowns is DropDown and not DropDownList. The user enters in their criteria and then presses a search button. I then take the values from the criteria and then execute a stored procedure with those values and retrieve the results.

I load the DropDowns using the following code:
With Me.cboBoxLocation
    .DataSource = dsLocation.Tables("Values")
    .DisplayMember = dsLocation.Tables("Values").Columns("Description")
    .ValueMember = dsLocation.Tables("Values").Columns("Description")
    .Text = ""
End With
Since it is a search window I want all of the initial criteria to be blank when the search window comes up. This can be accomplished easily enough by setting the text property of cboBoxLocation to "". On the windows form the textboxes and DrowDowns are blank. However if I grab the value of cboBoxLocation.Text right after the above code it will be equal to a value that is in the "Values" table. Even if I set the Text property again to "", the Text property doesn't really get set.

Even though it would probably work, I didn't really want to add an empty string value to the table from where I am retrieving the Location values. That just seems like a work around. Has anyone done anything like this with a search window? I can't force the user to select a value for the Location so blank has to be an option. I am sure there is a simple way to accomplish this and I am just missing it. Any help would be appreciated.

Thanks,

Vic
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform