Issue with data bound grid (DBGrid1)... 
Author Message
 Issue with data bound grid (DBGrid1)...

The grid is bound to a data Data control ("Data1") which is bound to Jet 4.0
and to a database.

The grid has three columns: Quantity, Price, Total. The Total column
automatically sums (Price * Quantity). How do i make ONLY that column
(Total) read only so the user cannot change the value? As it is now, user
can change the numbers in the Total column and when they go to the next
field it will change it back to the correct number, which is good. But I'd
really like to lock that column or make it read only so the user cannot put
the cursor in it to manipulate the code-generated value.

Any suggestions will be appreciated. Thanx!



Tue, 14 Sep 2004 06:05:35 GMT  
 Issue with data bound grid (DBGrid1)...

Quote:
> The grid is bound to a data Data control ("Data1") which is bound to Jet
4.0
> and to a database.

> The grid has three columns: Quantity, Price, Total. The Total column
> automatically sums (Price * Quantity). How do i make ONLY that column
> (Total) read only so the user cannot change the value? As it is now, user
> can change the numbers in the Total column and when they go to the next
> field it will change it back to the correct number, which is good. But I'd
> really like to lock that column or make it read only so the user cannot
put
> the cursor in it to manipulate the code-generated value.

> Any suggestions will be appreciated. Thanx!

Does the grid have a "Locked" property for the columns collection?


Wed, 15 Sep 2004 06:20:20 GMT  
 Issue with data bound grid (DBGrid1)...
no, there is no "locked" property for the grid columns.

I thought this may be an option, but i cant figure out if its possible in
creating the database itself : can an jet database field be set as an
auto-insert field that takes info from other fields to deduce the field
value? The field would inherently be locked to user input since it value is
generated automatically, and if a grid control was bound to it, the column
may be forced to read only - but that is just pure speculation, im guessing
its not possible with just a jet database alone.


Quote:


> > The grid is bound to a data Data control ("Data1") which is bound to Jet
> 4.0
> > and to a database.

> > The grid has three columns: Quantity, Price, Total. The Total column
> > automatically sums (Price * Quantity). How do i make ONLY that column
> > (Total) read only so the user cannot change the value? As it is now,
user
> > can change the numbers in the Total column and when they go to the next
> > field it will change it back to the correct number, which is good. But
I'd
> > really like to lock that column or make it read only so the user cannot
> put
> > the cursor in it to manipulate the code-generated value.

> > Any suggestions will be appreciated. Thanx!

> Does the grid have a "Locked" property for the columns collection?



Thu, 16 Sep 2004 06:57:07 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Question about data bound grid control (DBGrid1)...

2. Data Bound Combo Box within a Data Bound Grid

3. binding a data bound grid control programmatically

4. Data grid and data binding with a collection

5. First Cell Empty in Data Grid bound to ADO Data Control

6. Data-bound Masked Edit makes all data-bound controls not display data

7. VB 4 to 5 upgrade issue - data bound combo boxes

8. How to Bind A Manipulated Result rows of a Stored Procedure to a Data Grid

9. data bound grid

10. Binding Web Form Data Grid

11. Microsoft Data Bound Grid Control 5.0 (SP3)

12. VB6 Data bound grid

 

 
Powered by phpBB® Forum Software