I have been able to bind my data to a dropdown list successfully. However, I need to insert an item into the list that would say something like "make selection". I have tried the Add method from the item but could not get it to work. Can someone help me? Thanks,
enak
If you add it before you bind, the binding will over-write it. If you add it after you bind, the "Make Selection" will be at the end of the list. Here is a snip that will put it at the top: [code] DropDownList1.DataSource = dataSource; DropDownList1.DataBind();
DropDownList1.Items.Insert(0, "Make Selection"); [/code] Hope this helps. Charley.
enak
Contributor
2185 Points
446 Posts
Binding to a Dropdown list
Aug 06, 2003 02:17 PM|LINK
ndinakar
All-Star
49092 Points
6868 Posts
Moderator
MVP
Re: Binding to a Dropdown list
Aug 06, 2003 02:49 PM|LINK
Dinakar Nethi
Life is short. Enjoy it.
***********************
bogz
Member
20 Points
4 Posts
Re: Binding to a Dropdown list
Aug 06, 2003 02:52 PM|LINK
enak
Contributor
2185 Points
446 Posts
Re: Binding to a Dropdown list
Aug 06, 2003 04:11 PM|LINK