Question about data bound grid control (DBGrid1)... 
Author Message
 Question about data bound grid control (DBGrid1)...

I need to make a single column read-only or locked. Heres how its setup so
far...

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:17:32 GMT  
 Question about data bound grid control (DBGrid1)...
DBGrid1.Columns("Total").Locked = True
Quote:

> I need to make a single column read-only or locked. Heres how its setup so
> far...

> 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!



Sun, 19 Sep 2004 17:59:42 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Issue with data bound grid (DBGrid1)...

2. binding a data bound grid control programmatically

3. Data Bound Combo Box within a Data Bound Grid

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

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

6. newebi question on data bound grid

7. Microsoft Data Bound Grid Control 5.0 (SP3)

8. DBGRID32.OCX - Data Bound Grid Control 5.0

9. DBGRID32.OCX - Data Bound Grid Control 5.0

10. Microsoft Data Bound Grid Control ( DBGRID32.OCX)

11. Bookmark for bound data grid control

12. Microsoft Data Bound Grid Control 5.0 (SP3)

 

 
Powered by phpBB® Forum Software