|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
BindingSourceYou cannot vote on your own post
0 Hello, I use a master/detail form, where records are shown. this form was created in VB 2010, using the design tools of VS. When i select add on BindingNavigator, the bound controls clear, as expected. The behaviour i need is the opposite. Like that i can create a new record, based on the last one. Any suggestion? thanks I am not quite sure if I understand what you are asking for.
You want to "Default" the current record with the prior record? Is that what you are looking for? Show quoteHide quote "Vasco" <Va***@discussions.microsoft.com> wrote in message news:4A426B74-4F43-46E8-96E8-3C470DF9768E@microsoft.com... > You cannot vote on your own post > 0 > > Hello, > > I use a master/detail form, where records are shown. this form was created > in VB 2010, using the design tools of VS. When i select add on > BindingNavigator, the bound controls clear, as expected. > > The behaviour i need is the opposite. Like that i can create a new record, > based on the last one. > Any suggestion? > > thanks i want to create a new record, based on the values of another record.
basixally i want to copy records. anyway, i managed to find a solution: If Me.G01BindingSource.Current IsNot Nothing Then Dim drvOld As DataRowView = DirectCast(Me.G01BindingSource.Current, DataRowView) Dim drvNew As DataRowView = DirectCast(Me.G01BindingSource.AddNew(), DataRowView) For Each dc As DataColumn In drvNew.Row.Table.Columns If Not dc.ReadOnly AndAlso Not dc.AutoIncrement Then 'Don't try to overwrite a ReadOnly or AutoIncrement column. drvNew.Row(dc) = drvOld.Row(dc) End If Next dc Me.G01BindingSource.ResetBindings(False) End If G01_BindindSource refers to main table. Process is similar to child table. Show quoteHide quote "Miro" wrote: > I am not quite sure if I understand what you are asking for. > > You want to "Default" the current record with the prior record? > > Is that what you are looking for? > > "Vasco" <Va***@discussions.microsoft.com> wrote in message > news:4A426B74-4F43-46E8-96E8-3C470DF9768E@microsoft.com... > > You cannot vote on your own post > > 0 > > > > Hello, > > > > I use a master/detail form, where records are shown. this form was created > > in VB 2010, using the design tools of VS. When i select add on > > BindingNavigator, the bound controls clear, as expected. > > > > The behaviour i need is the opposite. Like that i can create a new record, > > based on the last one. > > Any suggestion? > > > > thanks > > . >
ASP problem: is this a bug in VBScript?
What's the alternative to XmlDataDocument? copy my vb project... is it as easy as copying the directory.. Convert XML schema to DataSet in VB Express 2008? Manually add rows. Problem with AllowUserToAddRows Imports System.Xml In VS 2010 SMTP Mail Problem Select manually a row of dataGridView. VB.net installing SQL 2008 express and database with my vb app |
|||||||||||||||||||||||