Re: Adding records via datagrid
- From: JohnBury <JohnBury@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Sep 2006 22:34:01 -0700
Ralph
if it helps then ...
I use ADO. Mt datasource is Access, and I have been using the old MSAccess
driver rather than Jet OLEDB. I changed over the to the JET driver
temporarily, but it gave me all sorts of problems with the DataGrid (reported
on the ADO newsgroup, but never satisfactorily answered.)
I create an ADODC and link it to the datagrid on my form to allow me to pull
in field names from an underlying table, select visible columns and set
properties etc. I then remove the ADODC and datagrid reference. In code I
do what ever selections and filters I want to on the underlying table and set
it as the grid's datasource.
I'm not sure how elegant and efficient this is, but it seems to work.
--
UK John
"Ralph" wrote:
.
"JohnBury" <JohnBury@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:62F156E1-0E0C-4538-B302-922A9A57769B@xxxxxxxxxxxxxxxx
I want to use a datagrid to add records to a table.easy
The table is filtered and bound to the grid.
I want the user to add one or more records to the grid and for these to be
written to the underlying table, and linked back to an owning record.
I have been able to do everything I want to do apart from making it wholly
intuitive.
The behaviour of the grid (I think) is a bit odd!
I can add new data in the 'new' record row. What I can't do is find an
(and intuitive) way for the grid to offer up a further new record row. Iit
have to click on another record or force a refresh of the datagrid, before
will go through its update action, write the record away and then offer anew
entry row.
How can I either:
1) detect that I have completed my record entry and force the control to
update the table a give me a new row, or
2) generate a new blank row as soon as I begin to add new data (I think MS
Access works like this!)
I don't really want to have to use other controls and assocaited code as
this seems to devalue the use of a bound control!
Any help please
John
The school children of Bolton await your wisdom!
--
UK John
I lost track. Are you using ADO or DAO?
DataGrid sp?
-ralph
- Follow-Ups:
- Re: Adding records via datagrid
- From: Ralph
- Re: Adding records via datagrid
- References:
- Re: Adding records via datagrid
- From: Ralph
- Re: Adding records via datagrid
- Prev by Date: Re: Adding records via datagrid
- Next by Date: Re: Adding records via datagrid
- Previous by thread: Re: Adding records via datagrid
- Next by thread: Re: Adding records via datagrid
- Index(es):
Relevant Pages
|