Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using AspxComboBox in my page.. i want to show two columns value in combo box.. how can i add columns in combo box..

thanks.
Posted

There is an article on the subject here on Codeproject.

Creating a Multicolumn Combo Box in ASP.NET[^]
 
Share this answer
 
VB
Dim datset As New DataSet()
                      If (Not datset Is Nothing) And (Not datset .Tables(0).Columns(0).ColumnName().Equals("Error", StringComparison.OrdinalIgnoreCase)) Then
               combobox.TextField = datset .Tables(0).Columns(1).ColumnName
               combobox.ValueField = datset .Tables(0).Columns(0).ColumnName
               combobox.DataSource = datset .Tables(0)
               combobox.DataBind()
           End If
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900