C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




binding the columnvalue to the combobox in Windowsform


Posted Date: 29 Aug 2008      Total Responses: 1

Posted By: A.raghavender       Member Level: Gold     Points: 1


in dataset i have one string value,that value i have to bind to combobox in C#



Responses

Author: D.Jeya kumar(JK)    29 Aug 2008Member Level: DiamondRating:     Points: 5
Hi,


Use the Dataset.Tables(0) to bind the Dataset to the Drowdown and then you need to set the column name as DropDownList1.DataTextField and DropDownList1.DataValueField just like the below code.



DropDownList1.DataSource = ds.Tables(0)
'It will show the Values in the dropdown
DropDownList1.DataTextField = "Columnname"
'It will not be shown as it is used for internal purpose
DropDownList1.DataValueField = "Columnname"




Regards
JK



Post Reply
You must Sign In to post a response.
Next : Re:Binding column value to combo box in windows
Previous : RE:Extracting only date from mm/dd/yyyy
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

silicone halloween masks

Contact Us    Privacy Policy    Terms Of Use