True DBGrid standard in unbound mode

True DBGrid standard in unbound mode

Post by Greg Strau » Fri, 21 Nov 1997 04:00:00





>I tried to use True DBGrid standard in unbound mode but I get some
>difficulties.

>In the first time, I insert datas in True DBGrid standard by code.  After I
>want to change a data in a cell but if I did not change the row and come
>back, I get an error (message:  data access error).  I want the user insert
>datas without changing row.

>And the second thing.  After the update of a cell, I want to make some
>calculations and insert the result in 3 cells of the grid.  I tried a lot
>of thing but nothing works.  I take the sample code I looked in the True
>DBGrid standard tutorial for mode 3.

>Help me please,

>--
>Nathalie Turgeon



Hi,

First off, if you want to use the grid in "unbound" mode, you can't
attach to a RDC/DAO control (otherwise it's "bound"). That may be the
source of the "Data Access Error". I know this may be obvious to you,
but I just want to make sure it's covered.... :-)

When you use a grid in unbound mode, TrueGrid will call event handlers
that will ask for the data to be displayed, and to ask you to add new,
update, or delete rows. In essence, you're providing the data source
interface to the grid, whether it be a 2 dimension array, or a
Collection of records, or a link to an rdoResultSet, or whatever. This
isn't a real simple thing to do, but each step is quite
straightforward, and once this is done, adding extra columns for
calculations is actually very simple.

What exactly is your data source that you want to fill the grid with?
Your approach will obviously depend on this. I've had to do this for
several types of data. Let us know and we'll go from there!

Hope this helps a bit.

----------------------------------------------------
Greg Strauss
Visionary Solutions Corp.
Victoria, BC

(remove abc above for email address)

 
 
 

1. True DBGrid, Standard, Unbound Mode 3

I've just gotten the Apex True DBGrid Standard Edition with the new
Unbound Mode=3. Strange things are happening to me.

When the grid "binds", using the Rebind Method, the first time,
my data is displayed just fine. Looking at the calls to the ClassicRead
event shows it reading each column in each row twice.

If I edit a field and change to another row, it reads the new row and
then reads rows 1 through the edited row, rather than 0 through the
edited row. For example, if I have a 2 column grid with 4 rows and
change cell (2,1) (the third row, second column), I get a proper
ClassicWrite event and then get the following reads:
        (3,0), (3,1), (1,0), (1,1), (2,0), (2,1), (3,0), (3,1)

This has the effect of overwriting data from another row into my changed
row.

In addition, setting the Align or ColWidth properties for a column seem
to have the effect of wiping out the Locked property.

Anyone have any experience with this.

Thanks

Vern Mallu

2. Fox Digest

3. True DBGrid Pro - Unbound Column in Bound Mode

4. can Foxpro act as a SQL server ?

5. True Grid example in unbound mode

6. COM object to access search engines

7. True DB Grid in Unbound Mode

8. system / user time ?

9. VB4 Unbound True DBGrid to display data

10. VB4E and unbound True DBGrid

11. True DBGrid - Unbound columns - Filter

12. VB4, using DBGrid in unbound mode

13. dbgrid : unbound mode