True DBGrid Pro - Unbound Column in Bound Mode

True DBGrid Pro - Unbound Column in Bound Mode

Post by MacKinn » Sun, 25 Jan 1998 04:00:00



This is sort of a reposting, but actually the question is different...I figured
out the previous answer :)

I'm using True DBGrid Pro 5 with some FoxPro tables.  I'm also using a join
query on tables with non-unique indexes...Thus, I can't edit the underlying
table, but that's ok, since I don't want to.
What I want to do is have one unbound column, where the user can fill in a vlue
which will somewhat accompany the rest of the record on that row.  What I
actually do is write that value, along with the information in the grid, to
another table.  I don't need these values to persist if the query changes, only
while that particular query is there.  What happens now is that when I move off
the row, the value in the unbound column goes away,

I searched the manual, and the website, ad found a reference to using a
recordset clone to store the values of the unbound columns.  That part works -
tried it, and the array indeed stores the values.  But the help then says to
read off the array in the UnboundColumnFetch event.  Problem is, since I'm not
editing the underlying table (which is one of the premises of doing this), that
event isn't fired!  And it seems that trying to assign the value for a given
cell in the unbound columns programatically does nothing - it has to be read by
the grid when it wants to.

Has anyone successfully gotten this to work?   What piece of the puzzle am I
missing?

Thanks!
MacK

 
 
 

True DBGrid Pro - Unbound Column in Bound Mode

Post by Niels Anderse » Mon, 02 Feb 1998 04:00:00


You can download samples that do this from www.apexsc.com

--
############################################
# Niels Andersen
# http://users.*city.dk/~dko2897/

############################################

 
 
 

True DBGrid Pro - Unbound Column in Bound Mode

Post by MacKinn » Sun, 08 Feb 1998 04:00:00


And if you happen to be making the unbound column with of a read-only database,
or just filling it with some other data in mind that isn't related to the
underlying table/query's data proper, that you must refresh the *y grid
after column and/or row updates.  If not, your data for the unbound grid will
lurk in your array, and UnboundColumnFetch will never fire!
MacK


>You can download samples that do this from www.apexsc.com

>--
>############################################
># Niels Andersen
># http://users.*city.dk/~dko2897/

>############################################

 
 
 

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. Error '80040e21' from ODBC

3. True DBGrid standard in unbound mode

4. Changing of structure Paradox-tables (Table Language)

5. True DBGrid - Unbound columns - Filter

6. User Defined Functions (Easy Question)

7. Unbound column in bound dbgrid

8. Schema to capture Company information for not just the US

9. Problems with DBGrid in unbound mode and column objects **URGENT**

10. Copying from bound DBGrid to unbound DBGrid

11. True Grid example in unbound mode

12. True DB Grid in Unbound Mode

13. VB4 Unbound True DBGrid to display data