Datagrid event

Datagrid event

Post by Giacom » Fri, 19 Jul 2002 01:28:55

In the aftercol update event of the datagrid, I place code to validate data
entry and apply the change in the grid to the underlying database.   The
data error responses don't make sense to me.  If I try to read the current
row in the datagrid I get a

<data access error>

 If Not IsNumeric(myDatagrid.Columns(ColIndex).Text) Then

If I use the "adodc.recordset.updatebatch" command on the ado data control's
recordset, the  <data access error> goes away but other errors occur.

The datagrid is bound to a table that has it's contents continually removed
and readded - sort of a JET OLE version of a SQL Server temp table.

I want behavior that is similar to a VB5 running a Truegrid with an XArray.
If the user edits a field or adds a new records and in a special truegrid
mode, the xarray can update the underlying database after doing some data
validation.  Seems as though a bound adodc control should operate under the
same principles but without the xarray.  I thought I had this working, but
in a beta test it failed.

Whatever it is I think should work, is way, way off base.

If you've done this before... updated an underlying database from an adodc
recordset based upon data entered into the datagrid, I'm open to
suggestions.  I found the True Grid to be a real headache in the past and
would like to avoid using it - or any third party stuff - if possible.
Maybe that is my only solution.

Thanks for your reply,