So I have this listview which shows just the titles of the available quizzes in my database. What I am trying to do is if I click on a quiz title, all the data (questions and answer options) associated with the quiz title will be shown on the right side through labels. And then they will be shown one by one with the use of buttons, like if they want to go to the next question or read the previous question. Is that possible?
Sorry I don't have a code to post as I absolutely have no idea how to do this.
/>
This is the only code I have, just to show the Quiz Titles:
Please help :'(
Sorry I don't have a code to post as I absolutely have no idea how to do this.
This is the only code I have, just to show the Quiz Titles:
VB.NET:
[/FONT]Public Class frmQuizSelector
Dim dt1 As DataTable = New DataTable
Private Sub cmdExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click
Me.Hide()
End Sub
Private Sub frmQuizSelector_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.lvwListOfQuizzes.View = View.Details
Me.lvwListOfQuizzes.FullRowSelect = True
Me.lvwListOfQuizzes.Columns.Add("Quiz Title", 270)
Retrieve()
End Sub
Private Sub Populate(ByVal QuizTitle As String)
Dim row As String() = New String() {QuizTitle}
Dim item As New ListViewItem(row)
Me.lvwListOfQuizzes.Items.Add(item)
End Sub
Private Sub Retrieve()
Me.lvwListOfQuizzes.Items.Clear()
Dim sql As String = "Select * from tblQuestions"
AQuery = New OleDb.OleDbCommand(sql, AConn)
Try
AConn.Open()
AAdapter = New OleDb.OleDbDataAdapter(AQuery)
AAdapter.Fill(dt1)
For Each row In dt1.Rows
Populate(row(0))
Next
Catch ex As Exception
MsgBox(ex.Message)
AConn.Close()
End Try
End Sub
End Class[FONT=Verdana]
Please help :'(