I need to dislay the text file visitation.txt in a dataviewgrid, however, ,my code isnt working. Can anyone assist withthis?
Public Class FrmVisitation
Dim visitors() As String =IO.File.ReadAllLines(“visitation.txt”)
Private Sub BtnClsoe_Click(sender As Object, eAs EventArgs) Handles BtnClsoe.Click
Me.Close()
End Sub
Private Sub FrmVisitation_Load(sender AsObject, e As EventArgs) Handles MyBase.Load
Dim query = From lineIn visitors
Let data = line.Split(“,”c)
Let lastname = data(0)
Let firstname = data(1)
Let age = CInt(data(2))
Let SSClass = CInt(data(2))
Select lastname, firstname, age, SSClass
End Sub
Private SubdvgVisitors_CellContentClick(sender As Object, e AsDataGridViewCellEventArgs) Handles dvgVisitors.CellContentClick
dvgVisitors.DataSource = Query.ToList()
dvgVisitors.CurrentCell= Nothing
End Sub
End Class
Expert Answer
An answer will be send to you
PayPal Gateway not configured
PayPal Gateway not configured