عرض بيانات في Combo Boxمن قاعدة بيانات باستخدام vb.net
Combo Box
مثآل ..
cmd = New OleDbCommand
cmd.CommandType = CommandType.Text
cmd.CommandText = "SELECT * from student"
cmd.Connection = con
Dim da As New OleDbDataAdapter(cmd)
Dim DS As New DataSet
Try
da.Fill(DS, "student")
Catch ex As OleDbException
MsgBox(ex.ToString, MsgBoxStyle.OkOnly, "Exception")
Exit Sub
End Try
With cbo
.DataSource = DS.Tables("student")
.DisplayMember = "Name"
.ValueMember = "ID"
End Withسبحآن الله وبحمده .. سبحآن الله العظيم .. ,