1) ok ci siamo
2) ecco il codice che uso per salvare il record
le procedure filldatasetandview e bindfields sono :
Private Sub FillDataSetAndView()
' Initialize a new instance of the DataSet object...
objDataSet = New DataSet()
' Fill the DataSet object with data...
objDataAdapter.Fill(objDataSet, "customers")
' Set the DataView object to the DataSet object...
objDataView = New DataView(objDataSet.Tables("customers"))
' Set our CurrencyManager object to the DataView object...
objCurrencyManager = CType(Me.BindingContext(objDataView), CurrencyManager)
DgViewAllCustomers.DataSource = objDataView
End Sub
' This method will bind the textboxes to the dataview object
' and it will enable us to use currency manager to move throught
' records in teh database with buttons that we will
' create later
Private Sub BindFields()
' Clear any previous bindings...
txtCustomerID.DataBindings.Clear()
txtFirstName.DataBindings.Clear()
txtLastName.DataBindings.Clear()
txtAddress.DataBindings.Clear()
' Add new bindings to the DataView object...
' First parameter in the Add method
' is the name of the control property that we wish to bind to the data source
' Second parameter is the data view object
' Third parameter is the name of the column in the Microsoft Access database
txtCustomerID.DataBindings.Add("Text", objDataView, "ID")
txtFirstName.DataBindings.Add("Text", objDataView, "FirstName")
txtLastName.DataBindings.Add("Text", objDataView, "LastName")
txtAddress.DataBindings.Add("Text", objDataView, "Address")
End Sub
3) ok la funzione mi torna l'elenco delle righe con ID = a quello che gli passo...
domanda nella funzione io uso "id='{0}'" ma se volessi usare "FirstName='{0}'" cosa si intende con {0} il numero di colonna che corrisponde alla colonna del campo del db o cosa ??
4)cosa intendi "dopo il salvataggio puoi fare il filtro direttamente sul controllo che visualizza ? cosa intendi per controllo la datagridview ??