|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
store the data that is entered in the datagriviewI am filling the datagridview with a class containing 2 properties. sample code as below: Public Class DataGridData Private mName As String Private mName1 as string Public Property Name() As String Get Return mName End Get Set(ByVal value As String) mName = value End Set End Property Public Property Name1() As String Get Return mName1 End Get Set(ByVal value As String) mName1 = value End Set End Property End Class Dim TmpDGVData As New DataGridData TmpDGVData.Name = Textbox1.text TmpDSVData.Name1 = TextBox2.text Public DGVdata As New List(Of DataGridData) DGVData.add(TmpDGVData) Datagridview1.datasource = DGVData So In this way I am adding the data to the datagridview Now I want to access the data from datagridview (which is of type class datagriddata) and store so that when i run next time, the data is visible in the datagridview. But i cant define the type (of my class datagriddata) in My.Settings. if I define for example in this way in Settings.vb it doesnt work... Public propdataGrid As new List(Of Form1.DataGridData) Today I have tried on this issue from the morning. Please help me. Thank you for everyone. Dim bs As new BindingSource
bs.DataSource = DGVData DataGridView1.DataSource = bs Will you please be so kind to reply if a message has succeed. We are not paid to help you but just simply looking if we see more interesting problems Cor Datagridview1.datasource = DGVData Show quoteHide quote "friend" <lavanyaredd***@gmail.com> wrote in message news:b5cc3089-a39d-4f9b-a441-19e896b470b4@s31g2000vbp.googlegroups.com... > hello all, > I am filling the datagridview with a class containing 2 properties. > > sample code as below: > > Public Class DataGridData > Private mName As String > Private mName1 as string > > Public Property Name() As String > Get > Return mName > End Get > Set(ByVal value As String) > mName = value > End Set > End Property > > Public Property Name1() As String > Get > Return mName1 > End Get > Set(ByVal value As String) > mName1 = value > End Set > End Property > End Class > > Dim TmpDGVData As New DataGridData > > TmpDGVData.Name = Textbox1.text > TmpDSVData.Name1 = TextBox2.text > > Public DGVdata As New List(Of DataGridData) > > DGVData.add(TmpDGVData) > > Datagridview1.datasource = DGVData > > So In this way I am adding the data to the datagridview > Now I want to access the data from datagridview (which is of type > class datagriddata) and store so that when i run next time, the data > is visible in the datagridview. > > But i cant define the type (of my class datagriddata) in My.Settings. > > if I define for example in this way in Settings.vb it doesnt work... > Public propdataGrid As new List(Of Form1.DataGridData) > > Today I have tried on this issue from the morning. Please help me. > > > Thank you for everyone.
Show quote
Hide quote
On May 28, 4:47 pm, "Cor Ligthert[MVP]" <Notmyfirstn***@planet.nl> I am sorry...that doesnt work..thanks anyway.wrote: > Dim bs As new BindingSource > bs.DataSource = DGVData > DataGridView1.DataSource = bs > > Will you please be so kind to reply if a message has succeed. > > We are not paid to help you but just simply looking if we see more > interesting problems > > Cor > > Datagridview1.datasource = DGVData"friend" <lavanyaredd***@gmail.com> wrote in message > > news:b5cc3089-a39d-4f9b-a441-19e896b470b4@s31g2000vbp.googlegroups.com... > > > hello all, > > I am filling the datagridview with a class containing 2 properties. > > > sample code as below: > > > Public Class DataGridData > > Private mName As String > > Private mName1 as string > > > Public Property Name() As String > > Get > > Return mName > > End Get > > Set(ByVal value As String) > > mName = value > > End Set > > End Property > > > Public Property Name1() As String > > Get > > Return mName1 > > End Get > > Set(ByVal value As String) > > mName1 = value > > End Set > > End Property > > End Class > > > Dim TmpDGVData As New DataGridData > > > TmpDGVData.Name = Textbox1.text > > TmpDSVData.Name1 = TextBox2.text > > > Public DGVdata As New List(Of DataGridData) > > > DGVData.add(TmpDGVData) > > > Datagridview1.datasource = DGVData > > > So In this way I am adding the data to the datagridview > > Now I want to access the data from datagridview (which is of type > > class datagriddata) and store so that when i run next time, the data > > is visible in the datagridview. > > > But i cant define the type (of my class datagriddata) in My.Settings. > > > if I define for example in this way in Settings.vb it doesnt work... > > Public propdataGrid As new List(Of Form1.DataGridData) > > > Today I have tried on this issue from the morning. Please help me. > > > Thank you for everyone. > >
Show quote
Hide quote
On May 28, 4:47 pm, "Cor Ligthert[MVP]" <Notmyfirstn***@planet.nl> Thanks alot....that worked...wrote: > Dim bs As new BindingSource > bs.DataSource = DGVData > DataGridView1.DataSource = bs > > Will you please be so kind to reply if a message has succeed. > > We are not paid to help you but just simply looking if we see more > interesting problems > > Cor > > Datagridview1.datasource = DGVData"friend" <lavanyaredd***@gmail.com> wrote in message > > news:b5cc3089-a39d-4f9b-a441-19e896b470b4@s31g2000vbp.googlegroups.com... > > > hello all, > > I am filling the datagridview with a class containing 2 properties. > > > sample code as below: > > > Public Class DataGridData > > Private mName As String > > Private mName1 as string > > > Public Property Name() As String > > Get > > Return mName > > End Get > > Set(ByVal value As String) > > mName = value > > End Set > > End Property > > > Public Property Name1() As String > > Get > > Return mName1 > > End Get > > Set(ByVal value As String) > > mName1 = value > > End Set > > End Property > > End Class > > > Dim TmpDGVData As New DataGridData > > > TmpDGVData.Name = Textbox1.text > > TmpDSVData.Name1 = TextBox2.text > > > Public DGVdata As New List(Of DataGridData) > > > DGVData.add(TmpDGVData) > > > Datagridview1.datasource = DGVData > > > So In this way I am adding the data to the datagridview > > Now I want to access the data from datagridview (which is of type > > class datagriddata) and store so that when i run next time, the data > > is visible in the datagridview. > > > But i cant define the type (of my class datagriddata) in My.Settings. > > > if I define for example in this way in Settings.vb it doesnt work... > > Public propdataGrid As new List(Of Form1.DataGridData) > > > Today I have tried on this issue from the morning. Please help me. > > > Thank you for everyone. > >
Visual Studio 2008 hogging memory
partition numbers in four terms ListView - Caching Thumbnails? System.IO.File.Copy + NTFS Streams + special ACLs VS2010 for database developers How to catch page redirect exporting dataset to Excel is slow Converting from Access 32bit 64bit store the data that is entered in the form |
|||||||||||||||||||||||