G
Guest
I'm going nuts using the currencymanager. Am I the only person using this
manager, I'm not getting any replies to my post, neither do I see anyone
posting similar problems. Maybe I'm not using it the way, it's supposed to
be, some one please help me out..
I'm doing a delete of a newrow added depending on user selection, and then
adding another new row, but it just doesn't get added. Does that make sense.
ok.
Here's the code.
Private sub Addnewrow()
drNewRow = dsAssignMaster.Tables("AssignMaster").DefaultView.AddNew
drNewRow.BeginEdit()
'/////Set All Checkboxes and comboboxes and not null values.
drNewRow.Item("StateId") = cboState.SelectedValue
drNewRow.Item("CountryId") = cboCountry.SelectedValue
drNewRow.Item("FollowupRequired_r") = False
drNewRow.Item("InvoiceRequired") = False
drNewRow.Item("AssignmentId") = "NewRow"
CurrMgrForm.Position =
dsAssignMaster.Tables("AssignMaster").DefaultView.Find("NewRow")
End Sub
'///////////Delete the newly added row if the user navigates to a different
record.////
Private Sub butRefresh_Click
If NewRow Then
CType(CurrMgrForm.Current, DataRowView).Row.Delete()
CurrMgrForm.EndCurrentEdit()
dsAssignMaster.Tables("AssignMaster").AcceptChanges()
End If
AssignmentId = ""
RefreshasNewForm()
End Sub
After this I call the Addnewrow based on user selection, but the row doesn't
get added. The number of rows in the table remains the same.
What else is required here.
Any help is appreciated.
Debi
manager, I'm not getting any replies to my post, neither do I see anyone
posting similar problems. Maybe I'm not using it the way, it's supposed to
be, some one please help me out..
I'm doing a delete of a newrow added depending on user selection, and then
adding another new row, but it just doesn't get added. Does that make sense.
ok.
Here's the code.
Private sub Addnewrow()
drNewRow = dsAssignMaster.Tables("AssignMaster").DefaultView.AddNew
drNewRow.BeginEdit()
'/////Set All Checkboxes and comboboxes and not null values.
drNewRow.Item("StateId") = cboState.SelectedValue
drNewRow.Item("CountryId") = cboCountry.SelectedValue
drNewRow.Item("FollowupRequired_r") = False
drNewRow.Item("InvoiceRequired") = False
drNewRow.Item("AssignmentId") = "NewRow"
CurrMgrForm.Position =
dsAssignMaster.Tables("AssignMaster").DefaultView.Find("NewRow")
End Sub
'///////////Delete the newly added row if the user navigates to a different
record.////
Private Sub butRefresh_Click
If NewRow Then
CType(CurrMgrForm.Current, DataRowView).Row.Delete()
CurrMgrForm.EndCurrentEdit()
dsAssignMaster.Tables("AssignMaster").AcceptChanges()
End If
AssignmentId = ""
RefreshasNewForm()
End Sub
After this I call the Addnewrow based on user selection, but the row doesn't
get added. The number of rows in the table remains the same.
What else is required here.
Any help is appreciated.
Debi