Hi Bob:
1) Drop a DataGridView on a form
Done.
2) Drop a BindingSource on a form
Created by the obectdatasource
3) Create a Datasource for the BindingSource
?? The datasource is a List<class> function (Or the objectdatasource??? HOW???)
4) Bind the DataGridView to the BindingSource: DataSource + DataMember
?? Done. Maybe its not clear what you mean with:"DataSource + DataMember" Found no datamember!
5) Use the generated TableAdapter to fill the DataSet defined in step #3.
?? The TableAdapter is never created.
This is the part which holds the update,add,insert procs WHEN using a web app (aspx form file)
This is what I miss.
What you describe is what happens when creating a web app (using aspx page with gridview).
WHAT I have done:
1) created a winform for a win app
2) created a datagridview
3) created a class with its properties which are for the gridview
4) created an objectdatasource from this class
5) the datagridview created a bindingsource from the dataobjectsource
7) I created a function which returns a list of <class> objects.
8) on winform constructor I assigned the gridview datasource the mentioned list<class> function
9) the data are listet correctly
There is NO tableadapter.
No chance for add,apdate,delete!
What have I done wrong?
What should I do to get my add, insert, delete?
Best
Juergen
Main Topics
Browse All Topics





by: TheLearnedOnePosted on 2007-11-09 at 10:06:57ID: 20251561
Here is a simple approach:
1) Drop a DataGridView on a form
2) Drop a BindingSource on a form
3) Create a Datasource for the BindingSource
4) Bind the DataGridView to the BindingSource: DataSource + DataMember
5) Use the generated TableAdapter to fill the DataSet defined in step #3.
Bob