Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
08-31-2005, 05:51 PM #1
- Join Date
- Aug 2005
- Thanked 0 Times in 0 Posts
How to bind a DropDownList to a database field
I'm trying to bind a ddl with a database field that is a Yes or No field. I can't seem to figure out how to make it work. In design view, I selected the field from the databindings, and then in code view put the normal...
Me.SqlDataAdapter1.SelectCommand.Parameters("@LeadID").Value() = intLeadid Me.SqlDataAdapter1.Fill(DsLegal1.ClientInfo) Me.DataBind()
08-31-2005, 08:32 PM #2
- Join Date
- Jun 2005
- Near Chicago, IL, USA
- Thanked 32 Times in 31 Posts
What object is "Me"?
I don't see the code to bind a DropDownList here. This looks more like a DataGrid.
See this tutorial for how to make dropdownlists in a DataGrid bound to db fields.
If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit http://www.kaelisspace.com/