having a problem using addnew method
-
i'm having a hard time figuring out where did i go wrong with this code. Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click 'Begin Add operation -- Enable textboxes and 'disable buttons EnableControls(True) SetButtons(False) 'Add a new blank row to the dataset Me.BindingContext(DsCourse1, "Course").AddNew() 'Set the focus to the first textbox txtCourseID.Focus() End Sub is there something wrong with the syntax of the addnew method? coz it doesn't work :(( can somebody help me please thanks in advance guys!
-
i'm having a hard time figuring out where did i go wrong with this code. Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click 'Begin Add operation -- Enable textboxes and 'disable buttons EnableControls(True) SetButtons(False) 'Add a new blank row to the dataset Me.BindingContext(DsCourse1, "Course").AddNew() 'Set the focus to the first textbox txtCourseID.Focus() End Sub is there something wrong with the syntax of the addnew method? coz it doesn't work :(( can somebody help me please thanks in advance guys!
-
In what way doesn't it work? Do you also have a button or someother way to invoke Me.BindingContext(DsCourse1, "Course").EndCurrentEdit() after you have entered all your information to save the changes and end the edit?
i have resolved the problem, it's the textbox that i use for the birthdate has the problem i've tried this code which changes the date format into mm/dd/yyyy instead of mm/dd/yyyy hh:mm:ss of the text box displaying date and time from the database http://www.codeproject.com/vb/net/databindingconcepts.asp[^] this is where i got it and it doesn't work maybe it's just me but it's all ok now http://www.codeproject.com/vb/net/databindingconcepts.asp"