The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi
I have a combo on a windows form in a vb.net's windows application. I popoulated combo(cboClassList) as follows:
("getallsectiondetails" is sqlserver stored proc that provides all info to display in the combo box)
Sub Fill_Classes()
Dim objCon As SqlConnection
Dim sectionDataAdapter As SqlDataAdapter
Dim dsSection As New DataSet()
Dim strQueryForSection As String
Dim shiftinfoDataAdapter As SqlDataAdapter
Dim dsShiftinfo As New DataSet()
Dim strQueryForShiftinfo As String
Dim batchDataAdapter As SqlDataAdapter
Dim dsbatch As New DataSet()
Dim strQueryForbatch As String
Dim programDataAdapter As SqlDataAdapter
Dim dsProgram As New DataSet()
Dim strQueryForprogram As String
Dim intCtrVar As Integer
Dim TempItem As String
objCon = New SqlConnection(Constr)
cboClassList.Items.Clear()
objCon.Open()
strQueryForSection = "getallsectiondetails"
sectionDataAdapter = New SqlDataAdapter(strQueryForSection, objCon)
dsSection.Clear()
sectionDataAdapter.Fill(dsSection, "section")
For intCtrVar = 0 To dsSection.Tables("section").Rows.Count - 1
strQueryForShiftinfo = "getallsectiondetails"
shiftinfoDataAdapter = New SqlDataAdapter(strQueryForShiftinfo, objCon)
dsShiftinfo.Clear()
shiftinfoDataAdapter.Fill(dsShiftinfo, "shiftinfo")
strQueryForbatch = "getallsectiondetails"
batchDataAdapter = New SqlDataAdapter(strQueryForSection, objCon)
dsbatch.Clear()
batchDataAdapter.Fill(dsbatch, "batch")
strQueryForprogram = "getallsectiondetails"
programDataAdapter = New SqlDataAdapter(strQueryForSection, objCon)
dsProgram.Clear()
programDataAdapter.Fill(dsProgram, "program")
TempItem = dsProgram.Tables("program").Rows(intCtrVar).Item("degname") & " - " & dsbatch.Tables("batch").Rows(intCtrVar).Item("batchname") & " - " & dsShiftinfo.Tables("shiftinfo").Rows(intCtrVar).Item("shiftname") & " - " & dsSection.Tables("section").Rows(intCtrVar).Item("sectionname")
cboClassList.Items.Add(TempItem)
cboClassList.DisplayMember = TempItem
cboClassList.ValueMember = dsSection.Tables("section").Rows(intCtrVar).Item("sectionid")
Next
cboClassList.SelectedIndex = 0
End Sub
Now i want to get "sectionid" from currently selected item? How is it possible? Any help.......