How to add Items to combobox from database in C
>> YOUR LINK HERE: ___ http://youtube.com/watch?v=v5arJ7ZBShU
How to add Items to combobox from database in C#: • In windows form development often add data to combobox from database data. • In windows form development it very common to load data to combobox from different datasouces. We can can add combobox data in different way, we can add data to combobox form non database procedure like from textbox,combotext,array,list.arraylist,enum,from loop and also from database like SQL Server or any database . • In this video I have showed how to add data to combobox from database like SQL Server. • Working Steps: • 1. At first Design a simple form with one combobox and label. Changed the font and color properties to look nice • 2. I have already written a SQL Server ProductDB database script with create table tblProduct and insert 3 prodcut data. • 3. Then I have add the connection to my visual studio server explorer with SQL authentication • 4. Then In the form code class label I have create SqlConnection object with connection which was copied from proportion of database. • 5. In the load event of the form I have create SQL command and Create Sqldatabadapter and pass the command to the dataadapter and declare a datatable dt. And fill the dataadapter with the datatable. • 6. Then I have added the table to the combobox as a datasouce • 7. Then set the DisplayMember ( What to show) and ValueMember (What value it will return). • 8. Then Run and check. • • I will create lot of windows and other .net library related basic and advance video so do subscribe to see all. • To find the code I have written in this video, join to our facebook group by clicking following link: • / itsolution365 • You can also like to our facebook Page to get all video code clicking on following link: • / 2751525671556319 • • You can follow us on twitter clicking on following link: • / itsolut62078624 • We will create thousands of video related with information technology from our practical experience and those are used in our daily work and development. Stay with us. • Do like, share and comments and subscribe to my channel and click on bell button to get notification when new video uploaded. You may suggest me to make new video with new topic. • My Channel Subscription link: • / @itsolution8998 • Thanks again
#############################
