VB 2008, forms and bindingsource
-
Hi everybody I am working on app in vb 2008 and have following situation: I have one form with datagridview binded to access table with dataset, bindingsource, tableadapter and tablemanager. User cannot change, delete or add records in datagridview. On same form I have two buttons for editing and adding new records When user clicks on "edit" button another form is opened and on this form detailed information is displayed (based on row selected in datagridview) so user can edit and save data. On second form there are several txt boxes binded to same table through another dataset filtered on current record with following code: frmPD.TblPartnersBindingSource.Filter = "CompanyID =" & TblPartnersDataGridView.CurrentRow.Cells(0).Value.ToString My quiestions are: 1. Is this correct way to open "details" form (using filter property of bindingsource) 2. How to use same "details" form to add new record. Sincerely Ivan
-
Hi everybody I am working on app in vb 2008 and have following situation: I have one form with datagridview binded to access table with dataset, bindingsource, tableadapter and tablemanager. User cannot change, delete or add records in datagridview. On same form I have two buttons for editing and adding new records When user clicks on "edit" button another form is opened and on this form detailed information is displayed (based on row selected in datagridview) so user can edit and save data. On second form there are several txt boxes binded to same table through another dataset filtered on current record with following code: frmPD.TblPartnersBindingSource.Filter = "CompanyID =" & TblPartnersDataGridView.CurrentRow.Cells(0).Value.ToString My quiestions are: 1. Is this correct way to open "details" form (using filter property of bindingsource) 2. How to use same "details" form to add new record. Sincerely Ivan
hello there is an idea that you could use your textboxes at same form(let me say top) when you navigate between records,your detaild information will be shown in text boxes to the user. you can use TblPartnersBindingSource.addnew to insert a new record to database.