How to display only selected data in combo box at run time from database?
- by Joy1979
I am new to .Net and I am working on one task. Below is my scenario.
I have 2 tables:
Table 1: Students
StudentID StudentDetail
1 StudentName
2 StudentGrade
Table 2: Student_data
StudentDetail StudentRecords
StudentName John (Default)
StudentName Jacob
StudentName Smith
StudentGrade A (default)
StudentGrade B
StudentGrade C
Question: When window form loads (run time) I need to display StudentRecords in combo box with StudentName = "John" and StudentGrade = "A" as default followed by other values.
StudentName and StudentRecords are in Labels and values are in a ComboBox.
I am using VB.Net and VS 2010 with SQL 2008r2.
I would appreciate any step by step help. Apologies If my request is simple.