[AccessD] datagridview in vb.net 2010

Bill Patten bill_patten at embarqmail.com
Mon Sep 27 13:01:25 CDT 2010


?Dale,

That's the way it works, one data grid per form. If you try and force a 
second data grid you will find that several queries that you need to 
add/update/ and deleted will not be created and creating them by hand is 
tough.

I did it this way, I created a new form, dragged the appropriate dataset to 
the new form.

Then make sure that the correct binding source and table adapters etc are on 
the original  form you want, copy and paste the grid and the navigator to 
the form you want and it will work. You may need to add a tab and or a panel 
to have a second  navigator on one form, I didn't do that but needed the 
correct queries to add and update the second grid by typing in the row 
marked with the star or an existing row.

To see the queries I am talking about double click on the dataset find the 
table in the xsd view screen and then select the table adaptor and look at 
the properties you will notice Delete Command for example click the little 
drop down and the look at the command text.  These appear to be built by the 
wizard when it creates the binding navigator and will not be there if you 
just drag the table adaptor and binding source to the form.

HTH

Bill
--------------------------------------------------
From: "Dale Kalsow" <dkalsow at yahoo.com>
Sent: Monday, September 27, 2010 6:44 AM
To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
Subject: [AccessD] datagridview in vb.net 2010

Good Morning,

I was hoping someone here might have some experience with vb.net 2010.  Here 
is
what I have going on:

I am using the datagridview in vb .net 2010.  I have setup a datasource to 
an
access 2010 database.  I then drag that connection onto the form and it 
creates
my datagridview.  This all works fine.  My problems start with the second
datagridview.  The access database has several table and I have them all in 
the
same datasource.  When I drag the second table onto the from, the gridview 
is
created as normal and when I run the program, that data is populated into 
it.
However, I do not get a second naviator bar for it and when I try to save 
the
data via a button I created, I do not get an error but the data does not 
save.
Any help would be greatly appreciated.
Thanks!
Dale



-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com 




More information about the AccessD mailing list