How to bind all the columns in a data table to dropdownl list?
-
Hi, Is it possible to bind all the columns in a data table to a dropdownlist? ex, I have the below table, I want to bind all the columns except ProductID column to a dropdownlist and when user select product from the list I need to get the productID.Can any one suggest me.. If not possible in dropdown is there any alternative method to meet my requirement? am using vs2008 asp.net and C# ProductID Product Name Version Platform 111 Madeira 2.0 windows 222 Amazon 1.1 windows 333 Madeira3 2.1 Lynux
-
Hi, Is it possible to bind all the columns in a data table to a dropdownlist? ex, I have the below table, I want to bind all the columns except ProductID column to a dropdownlist and when user select product from the list I need to get the productID.Can any one suggest me.. If not possible in dropdown is there any alternative method to meet my requirement? am using vs2008 asp.net and C# ProductID Product Name Version Platform 111 Madeira 2.0 windows 222 Amazon 1.1 windows 333 Madeira3 2.1 Lynux
-
Loop the datatable and Append All the values expect productId into string .Use this string as DataTextField anf ProductId as DataValueField
-
thanks for your suggestion. I have hundreds of products in the table. Is there any possibility to have scroll bar in the dropdonwnlist.
-
When you click on the arow in the drop down list , it will be shows a list of items with scroll bar. am i right?
-
when the dropdownlist gets too many items in it the user cannot select the bottom ones (the bottom goes below the screen area). How do i put the scrollbar in the dropdownlist?