I still have some update issues
Now, I have a filtered dataview on wich I want to change some off the rows columns(field) values
clearly, I am not finished here because nothing got updated
I work with the dataset on the mainform that I want to update-
see:FTDBase.TDataSet.Jobs.DefaultView
I think, I need to find the primary key for each datarowview in the apointed tableadapter
on the mainform and change that row.
Is this the easiest way to do it?
thanks in adv, Richard
Now, I have a filtered dataview on wich I want to change some off the rows columns(field) values
clearly, I am not finished here because nothing got updated
I work with the dataset on the mainform that I want to update-
see:FTDBase.TDataSet.Jobs.DefaultView
I think, I need to find the primary key for each datarowview in the apointed tableadapter
on the mainform and change that row.
Is this the easiest way to do it?
VB.NET:
Dim dv As DataView = FTDBase.TDataSet.Jobs.DefaultView
Dim drv As DataRowView
dv.RowFilter = Filter1
i = dv.Count
' test(i.ToString)
Dim CreditsFiltered As Decimal
Dim dvIsFilteredCounter As IEnumerator = dv.GetEnumerator
While dvIsFilteredCounter .MoveNext
drv = dvIsFilteredCounter .Current
CreditsFiltered = CreditsFiltered + drv("Credits")
b = UpdateDataRowView(drv)
End While
Me.TotalTextBox.Text = Format(CreditsFiltered , "c2")
End Sub
Sub test(ByVal input As String)
MsgBox(input, , "FieldData")
End Sub
Function UpdateDataRowView(ByVal drv As DataRowView) As Boolean
drv.BeginEdit()
test(drv("Column1").ToString)
drv("Column1") = 1
drv.EndEdit()
' test(drv("Column1").ToString)
Return True
End Function
thanks in adv, Richard
Last edited: