Copying from bound DBGrid to unbound DBGrid

Copying from bound DBGrid to unbound DBGrid

Post by JOHN PUCCI » Sat, 01 Aug 1998 04:00:00



I want to display data in a DBGrid. However, I want one of the columns to be
changeable and the rest of the grid to be locked. I tried setting the
AllowUpdate property to True and locking all the columns except the first,
but I still can't change the first column. I think this is because I am
displaying values from two tables in the grid. If I use only one table, I
can then change the data in the first column. Also, when the data is changed
in the first column, I don't want the database updated.

One way I think I can do this is by copying from a bound DBGrid to an
unbound DBGrid, but whatever I've tried hasn't worked. So far I can't get
anything into the unbound DBGrid. Any ideas or code would be appreciated.

Thanks Rick

 
 
 

1. True DBGrid Pro - Unbound Column in Bound Mode

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

2. Stored Procedure with an parameters

3. Unbound column in bound dbgrid

4. Greater Vancouver - Senior System Analyst

5. Copying DBGrid contents to clipboard (Or copying a table from a Data component to clipboard)

6. HELP WITH ISO Remote Database Access Standard !!!

7. populating an unbound DBGrid

8. build package with vb.net

9. Unbound DBGrid vs Grid

10. Unbound dbgrid sort

11. how to add a new a row in unbound dbgrid

12. Question on Unbound DBGrid

13. Sample code for DBGrid in Unbound mode