F
fren4uu
Hello all,
Please help in finding out the solution..
I have problem in saving the data through my.settings in datagridview
Here is my code : my.settings.test is of type bindingsource
Thank you for any help...
Public Class import
Private mName As String
Private mName1 As String
'#Region "Properties"
Public Property Name() As String
Get
Return mName
End Get
Set(ByVal value As String)
mName = value
End Set
End Property
End Class
Public temp1 As New List(Of import)
Public bs as new bindingsource
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
For i As Integer = 1 To 10
Dim temp As New import
temp.Name = "xxx"
temp1.Add(temp)
Next
bs.DataSource = temp1
My.Settings.test = bs
My.Settings.Save()
' Attach the BindingSource to the DataGridView.
Me.DataGridView1.DataSource = bs
End sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.DataGridView1.DataSource = My.Settings.test
End sub
Please help in finding out the solution..
I have problem in saving the data through my.settings in datagridview
Here is my code : my.settings.test is of type bindingsource
Thank you for any help...
Public Class import
Private mName As String
Private mName1 As String
'#Region "Properties"
Public Property Name() As String
Get
Return mName
End Get
Set(ByVal value As String)
mName = value
End Set
End Property
End Class
Public temp1 As New List(Of import)
Public bs as new bindingsource
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
For i As Integer = 1 To 10
Dim temp As New import
temp.Name = "xxx"
temp1.Add(temp)
Next
bs.DataSource = temp1
My.Settings.test = bs
My.Settings.Save()
' Attach the BindingSource to the DataGridView.
Me.DataGridView1.DataSource = bs
End sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.DataGridView1.DataSource = My.Settings.test
End sub