View Full Version : How to bind a DropDownList to a database field

Aug 31st, 2005, 05:51 PM
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

My dropdownlist isn't showing me anything, shouldn't it automatically populate the dropdownlist?

Aug 31st, 2005, 08:32 PM
What object is "Me"?
I don't see the code to bind a DropDownList here. This looks more like a DataGrid.

See this tutorial (http://www.developer.com/net/vb/article.php/10926_3320941_1) for how to make dropdownlists in a DataGrid bound to db fields.